From script tags to Online Store 2.0

Topic summary

A developer created a popup app using JavaScript and faced rejection from Shopify’s app review team for not using Online Store 2.0 standards. The core challenge: transitioning from traditional script tags to an OS 2.0-compatible implementation for an app intended for public distribution.

Initial Confusion:

  • Developer initially sought step-by-step instructions for converting script tags to OS 2.0 compliance
  • One response misunderstood the question, providing guidance for individual store customization rather than public app development

Resolution Found:

  • The developer solved the issue using Shopify CLI
  • Key insight: CLI can update existing app configurations and upload necessary files without rebuilding the entire app
  • No code changes required in the app itself—just run CLI to update configuration

Additional Implementation Detail:

  • Developers can detect if their app files are installed by loading all active theme files through the API on their backend
  • This detection requires an extra manual step for customers when app files are installed

Another developer confirmed experiencing the same issue, indicating this is a common pain point during the OS 2.0 migration process.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

I have just completed an app loading in a simple js script to trigger a popup based on the page / timers / exit intent.

As the popup is UX related, the app reviewer demands I load the script using Online Store 2.0, without any instructions how to do this. The only thing I can find is building an entire wrapper app using cli 3.0 that does exactly the same as my php app. Is this assumption correct?

Simply put: Does someone have a step-by-step instruction how to go from script tags to something Online Store 2.0 that will be approved for an external (php) app.

Hello there

To integrate an external PHP app with Shopify’s Online Store 2.0, you need to create a new Script Tag, add it to your theme and create a PHP script. Make sure the script is hosted on a server that is accessible from your Shopify store, and verify that the external app is working as expected. Also, make sure to use scripts from trusted sources and review the code before adding it to your store, Shopify will review and approve your script before it’s made live.

  1. Create a new Script Tag:
  • Go to the Shopify admin panel and navigate to the “Apps” section.
  • Click on the “Manage private apps” button.
  • Click on the “Create a new private app” button.
  • Give your app a name and a contact email address.
  • Under “Script tags,” select the “Online store” option.
  • Click on the “Save” button.
  1. Add the script tag to your theme:
  • Go to the Shopify admin panel and navigate to the “Themes” section.
  • Click on the “Actions” button next to the theme you want to edit.
  • Click on the “Edit code” button.
  • In the “Layout” folder, open the “theme.liquid” file.
  • Scroll to the bottom of the file and add the following code:

Replace [SCRIPT_TAG_URL] with the actual Script Tag URL provided by Shopify.

  • Click on the “Save” button.
  1. Create the PHP script:
  • Create a new PHP file with the code you want to use in your external app.
  • Make sure the PHP script is hosted on a server that is accessible from your Shopify store.
  1. Test the integration:
  • Go to your Shopify store and verify that the external app is working as expected.

I am sorry, I meant this question as app dev, to publish my app online. This means I have no acces to individual stores. I need to do “something” with my app to make it compatible with online store 2.0, and outside the CLI tutorial I cannot find any information how to do this.

1 Like

Same question, I’m stuck too.

I finally got it figured out afther thinking “okay, Ill make a new App then”. With Shopify CLI you can actually update your existing App configuration and upload all files. You do not have to change anything in your app, just run the CLI when you want to update the configuration and select your App. But you will also want to detect if your App-files are installed, this takes an extra manual step for the customer. You can detect this (in your own backend) by loading all active theme files of the customer through the API and check if your app-files are listed.