Install on Shopify
Add the XPmetric tracking snippet to your Shopify theme.liquid before the closing head tag.
Add XPmetric to your Shopify storefront so every theme page sends pageviews.
Replace YOUR_SITE_TOKEN with your site token from Settings → Sites → Get Script.
Tracking snippet
<script defer data-site="YOUR_SITE_TOKEN" src="https://xpmetric.com/p.js"></script>Steps
- In Shopify admin, go to Online Store → Themes.
- On your live theme, click Edit code.
- Open
layout/theme.liquid. - Paste the snippet just before
</head>. - Click Save.
Verify
Open your store in an incognito window and browse a product page. The XPmetric dashboard live feed should show the visit within a minute.
Revenue
Shopify checkout runs off your storefront domain. For payment attribution, use the Payments API from your order webhook or backend when a purchase completes.