layout/theme.liquid · open source (MIT) · ask in plain English

Add analytics to Shopify.

smolanalytics is open-source web analytics you install on a Shopify store with two script tags in your theme. It autocaptures every pageview, click, add-to-cart tap, form submit and JS error with zero code, then lets you ask your store's numbers in plain English and get deterministic answers you can trust.

layout/theme.liquid
<!-- Online Store > Themes > Edit code > layout/theme.liquid, inside <head> -->
<script src="https://YOUR-INSTANCE/sdk.js"></script>
<script>smolanalytics.init("WRITE_KEY", { host: "https://YOUR-INSTANCE" })</script>

Put both tags in the <head> of theme.liquid so they load on every storefront page, including collection and product templates.

how do I add analytics to shopify?

smolanalytics is open-source web analytics you install on a Shopify store with two script tags in your theme. It autocaptures every pageview, click, add-to-cart tap, form submit and JS error with zero code, then lets you ask your store's numbers in plain English and get deterministic answers you can trust.

On Shopify the thing you actually want to measure is drop-off: which product pages get views but no add-to-cart, where checkout stalls, which collection links get rage-clicked. smolanalytics autocaptures clicks with the full element chain, so you see the exact button or variant selector people hit before they bounce, without writing tracking code for each one.

Because it runs from a script tag in theme.liquid it survives theme updates better than app-based trackers, and it's cookieless so you skip the consent banner on EU traffic. For custom moments like a completed purchase, call smolanalytics.track("purchase", { value: 49 }) from your thank-you page. Ask "which product pages had views but no add to cart last week" from the dashboard bar or your editor over MCP.

Honest pricing: 14-day full trial, no credit card. Then Solo $29/mo, never metered on seats or sites. Overage is $5/million with an emailed receipt, the dashboard never locks, and self-hosting the single Go binary is free forever (MIT).

Add analytics to Shopify tonight.

One snippet, or one endpoint. Tomorrow morning the verdict tells you which part of the funnel to fix.

questions

How do I add analytics to Shopify?
smolanalytics is open-source web analytics you install on a Shopify store with two script tags in your theme. It autocaptures every pageview, click, add-to-cart tap, form submit and JS error with zero code, then lets you ask your store's numbers in plain English and get deterministic answers you can trust.
Do I need a cookie banner?
Not in cookieless mode. smolanalytics can run without storing anything on the device, so there is no consent banner to add. You still get visitors, referrers, funnels, retention, and paths, and AI-assistant referrals (chatgpt.com, claude.ai, perplexity.ai) show up as their own channel.
Is it enough for a real product, or just page counts?
It does funnels, retention, paths, cohorts, and a daily verdict on what to fix, from the same events, and you ask it in plain English. It deliberately skips session replay, feature flags, and experiments. If you want a straight answer on what to fix, that you own and can self-host free, it fits.

keep reading