Shopify
Add the Grometrics script to Shopify theme.liquid before </head>.
Last updated June 3, 2026
Grometrics reads orders from Shopify and matches each one to the visitor session that generated it — same visitor ID used across your site, so a purchase links back to first touch, last touch, and every session in between. Once connected, you'll see Shopify's order count next to what each ad platform claims, side by side.
Prerequisites
- A Grometrics site ID from Settings > Tracking
- Access to the site, theme, or app code
- A way to publish the change
Steps
Open custom code
Open the Shopify theme.liquid before </head> custom code or template area.
Paste the script
Add the script before the closing head tag.
Replace YOUR_SITE_ID with your site ID from Settings > Tracking.
layout/theme.liquid
1<script defer src="https://usegrometrics.com/g.js" data-site="YOUR_SITE_ID"></script>Publish
Save the change and publish the site.
Options / Configuration
| Option | Type | Required | Description |
|---|---|---|---|
| data-site | string | ✓ | Your Grometrics site ID |
| defer | boolean | ✓ | Loads tracking without blocking rendering |
What happens next
Open the site once after publishing. Realtime should show the first pageview within a few seconds.
Verify your setup
Verify your setup
Troubleshooting
No event appears
Confirm the site ID matches Settings > Tracking and that the latest published code is running.
Was this page helpful?