How to Add Orbit Analytics to a Shopify Store

Shopify stores get tracking installed one of two ways: a direct edit to theme.liquid, or Shopify's newer Custom Pixels feature. The theme.liquid route is faster for straightforward pageview tracking and is what most stores use.

Setup steps

  1. Open your theme code editorFrom Online Store > Themes, find your live/published theme, click Actions, then Edit code.
  2. Open theme.liquidIn the Layout folder, open theme.liquid — this file wraps every page template rendered by your storefront.
  3. Paste the script before </head>Add the <script defer src="https://orbitanalytics.app/script.js" data-website-id="{id}"></script> tag directly above the closing </head> tag and save.
  4. Or use Custom PixelsIf you'd rather not edit theme code, Settings > Customer events > Custom Pixels lets you add a sandboxed script tied to storefront events, though the theme.liquid edit is simpler for basic pageview tracking.
  5. Confirm tracking across the storefrontBrowse a product page and start checkout, then confirm the visit appears in Orbit — note Shopify's hosted checkout runs on a separate domain from your storefront theme.

Frequently asked questions

Does this work with Shopify's Hydrogen/headless setup?

No — editing theme.liquid only applies to Shopify's standard Liquid-based storefronts. On a Hydrogen (React-based, headless) storefront, add the script to your app's root layout component instead.

Will the script track Shopify's hosted checkout pages?

Not by default. Shopify's checkout runs on a separate, more locked-down domain, and injecting scripts there generally requires Shopify Plus's checkout customization tools or a Web Pixels app extension, not a theme.liquid edit.

Will this slow down my store or hurt my speed score?

The script uses defer, so it loads in parallel with the rest of the page rather than blocking it, and the file itself is small — the effect on Shopify's storefront speed metrics is minimal.

Does updating my theme remove the script?

Yes, if you install a new theme version rather than editing your current one in place, you'll need to re-add the script tag to that theme's theme.liquid file.

See it on your own site

Free for 1 website, no card required.