Install Stellar on Shopify

Shopify has no Stellar app. Paste the snippet once in your theme head and it loads on every storefront page.

1. Copy the snippet

In Stellar, open the project for this site and copy the snippet from your domain settings. Leave Anti-Flicker on if you are running visual tests. Direct head install is what makes that work. How anti-flicker works.

2. Paste it on Shopify

  1. In Shopify admin, go to Online Store, then Themes.
  2. On your live theme, open the actions menu and choose Edit code.
  3. Open layout/theme.liquid.
  4. Paste the snippet inside <head>, before </head>.
  5. Save.

Checkout pages are hosted by Shopify, so the snippet does not run there. Storefront tests still work. To count completed purchases, set up the Custom Pixel after this install.

3. Confirm it loaded

  1. Open a published page in a private browser window. Editor and draft previews often hide the snippet.
  2. Open developer tools and go to the Network tab.
  3. Reload and look for stellar.js. If that request is there, the install is done.

If it does not load

  • Theme updates can wipe theme.liquid. After an update, confirm the snippet is still there.
  • Install it in one place. A copy in Google Tag Manager as well will double-count visitors.
  • Check a product page and a collection page, not only the homepage.

More on placement, Google Tag Manager, and flicker is in the general install guide.

Next