Install FastAnalytics on Shopify
Shopify lets you edit the theme layout, which is shared by your storefront pages. That is where the script goes.
Add the script to your theme
- In Shopify admin, go to Online Store > Themes.
- On your current theme, open the … menu and choose Edit code.
- Open
layout/theme.liquid. - Paste your script just before
</head>and save. - Open your store and check Realtime in your dashboard.
<script>window.hm=window.hm||function(){(window.hm.q=window.hm.q||[]).push(arguments)};</script>
<script defer src="https://e.fastanalytics.site/e.js" data-id="FA-XXXXXXXXXX"></script>Domains
Add both your own domain and your myshopify.com domain to the website in My websites, so visits from either are accepted.
Checkout pages
Shopify controls the checkout and usually does not run theme code there. Storefront pages (home, collections, products, cart) are measured; checkout steps may not be. Changing themes means pasting the script again in the new theme.
FAQ
Will it slow down my store?
No. The script is under 7 KB and loads deferred, after the page.
Keep reading
Install the FastAnalytics tracking scriptHow to add FastAnalytics to any website in two minutes: get your FA code, paste one line before the closing head tag and check that visits arrive in real time.Read →3 minTrack custom events: sign-ups, purchases, clicks and outbound linksCount the actions that matter with FastAnalytics: hm() in JavaScript, the data-hm attribute without code, and automatic outbound, WhatsApp, email and phone clicks.Read →4 minInstall FastAnalytics on WordPressTwo ways to add FastAnalytics to WordPress: a header-code plugin (no coding) or a small snippet in your child theme. Works with any theme and page builder.Read →3 min