Best Way for Shopify App Developers to Install JavaScript Chatbot Code on All Store Pages

ThePilsen
Shopify Partner
10 0 0

Hi fellow developers,

 

I'm developing a Shopify public app and need to install JavaScript code for a chatbot on every page of a store (e.g., index and product pages). This chatbot allows visitors to track orders and ask questions about products.

 

I was planning to use assets.json via the API, but realized the write_themes access scope is now restricted. To minimize work for the merchant, I need to insert <script>{code}</script> into something like layout/theme.liquid.

 

Should I implement this using theme extensions or app embeds? What’s the best approach to achieve this with minimal merchant effort?

 

Thanks for your insights!

Reply 1 (1)

PageFly-Theodor
Shopify Partner
630 79 94

Hi @ThePilsen ,
This is Theodore from PageFly - Shopify Page Builder App.

 

For your Shopify public app that injects chatbot code, choose app embeds over theme extensions for minimal merchant effort. Here's why:

  • App embeds:
    • Easier setup - no extra installation for merchants.
    • Automatic updates.
    • Works with all themes (Online Store 2.0 and vintage).
  • Theme extensions:
    • Requires extra installation step.
    • Manual updates by merchants.
    • Not compatible with vintage themes.


Best regards,
Theodore | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.