theme.liquid layout. That file wraps every storefront page, so one edit tracks your whole store.
Before you start
- A tinyanalytics site. If you don’t have one yet, follow the Quickstart.
- Your snippet from Settings → Tracking in your dashboard.
Add the snippet to theme.liquid
1
Open your theme's code
In your Shopify admin, go to Online Store → Themes, then on your current theme choose ⋯ → Edit code.
2
Open the layout file
Under Layout, open
theme.liquid.3
Paste before </head>
Paste your tinyanalytics snippet just before the closing
</head> tag, then save:Editing
theme.liquid tracks your storefront — product, collection, cart, and content pages. Shopify’s hosted checkout pages are separate and can’t be customized this way except on Shopify Plus, so checkout steps aren’t tracked by this install.Verify
Open your storefront in a browser, then check Realtime in your dashboard for your visit. See Verify your setup for the full check.Your install is working when your own visit appears in Realtime in your dashboard.
Related
Install on any platform
The universal method and other platforms.
Track custom events
Measure add-to-cart, signups, and more.
Configure the tracking script
Every
data-* option you can set.Verify your setup
Confirm tracking works.