Simplytics

Setup guides › Shopify

Add analytics to Shopify without cookies

One script tag, about 1.8 KB compressed. It sets no cookies, so there is no consent banner to add, and it needs no build step, no package and no configuration beyond the key.

Where the tag goes

Online Store → Themes → … → Edit code → layout/theme.liquid, before </head>.

<script async src="https://simplytics.dev/track.js" data-key="YOUR_SITE_KEY"></script>

Where your key comes from

The data-key in the tag above is a placeholder. Your own key is on your dashboard next to each site you add, and it is the same key for every page of that site. It is a public identifier, not a secret — it ships in the tag on every page you track — but a tag carrying YOUR_SITE_KEY reports nothing at all, so swap it before you deploy.

Check that it is working

  1. Deploy the change, then open any page of your own site in a normal browser window.
  2. Open your Simplytics dashboard. The visit appears within seconds — there is no processing delay to wait out.
Nothing after 60 seconds?

Single-page navigation

Client-side navigations are counted automatically. The tag patches history.pushState, history.replaceState and popstate, and re-counts whenever the path changes — so you do not need to fire anything yourself, and you should not: an extra call on top of this double-counts. Changes to only the query string or only the # fragment are ignored, which also means a router that navigates by # alone is not counted automatically.

30 days free, no card. See what it costs after that.

Other platforms: HTML · WordPress · Next.js · Nuxt · Astro · SvelteKit · Hugo · Ghost · Webflow · Framer · Squarespace