Add Web Analytics & Traffic Source Tracking to Your Shopify Store
Track traffic sources, UTM campaigns, session replays, and custom goals by adding the DataOwl snippet to your Shopify theme.
- Go to Online Store → Themes → ⋯ → Edit code.
- Open
layout/theme.liquid. - Paste the script just before
</head>and save.
theme.liquid
<script
defer
data-website-id="YOUR_SITE_ID"
src="https://usedataowl.com/js/script.cookies.js"
></script>Replace
YOUR_SITE_IDwith your site ID from the dashboard.
Verify installation
After you deploy:
- Visit your live website.
- Open the Realtime page of your DataOwl dashboard. Your visit shows up within a second, and the setup page says "Receiving events".
DataOwl ignores localhost so you don't count your own development traffic. Add
data-allow-localhost="true"to the tag to test locally. More options are in the script configuration reference.