Before you start
Create a site in UserTrail and copy the tracking snippet for the Shopify store you want to track.
You need permission to edit the Shopify theme or manage customer events, depending on how your store is set up.
Install through theme code
For many Shopify storefronts, you can add the UserTrail snippet to the theme layout.
General steps:
- In Shopify admin, open Online Store.
- Open Themes.
- Choose the active theme and open the code editor.
- Find the main layout file, often
theme.liquid. - Paste the UserTrail snippet before the closing
</head>tag. - Save and publish the change.
After saving, visit the storefront and confirm the snippet loads.
Consent and checkout pages
Shopify stores may have consent, privacy, or checkout restrictions depending on plan, region, and storefront setup.
If analytics consent is required, load UserTrail only after the visitor grants analytics consent.
Do not record sensitive payment information or private checkout details. Use masking and avoid installing tracking where sensitive data cannot be protected.
Verify recording
Open the live Shopify storefront and complete a test visit:
- View a product page.
- Add a product to cart.
- Navigate between pages.
- Wait for processing.
- Open UserTrail Sessions and Heatmaps.
Confirm the page paths, clicks, and device type look correct.
Troubleshooting
If no sessions appear:
- confirm the active theme contains the snippet
- check that the snippet site id matches UserTrail
- confirm tag or consent rules allow the script to load
- test without ad blockers
- check browser developer tools for blocked requests
If only some pages record, the snippet may be missing from a template or restricted page.