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

1

Open custom code

Open the Shopify theme.liquid before </head> custom code or template area.

2

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>
3

Publish

Save the change and publish the site.

Options / Configuration

OptionTypeRequiredDescription
data-sitestringYour Grometrics site ID
deferbooleanLoads 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?