Shopify integration

Connect your Shopify store so orders sync automatically and revenue attributes back to the visitor who bought.

Last updated July 2026

Overview

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.

Use the attribution mismatch guide to interpret the gap between claimed conversions and paid orders.

Steps

1

Install the tracking script

Add the Grometrics script to your Shopify theme, or install it from the Shopify App Store. It assigns each visitor a persistent ID and records sessions and pageviews.

Replace YOUR_SITE_ID with your site ID from Settings > Tracking.

theme.liquid

1<script defer src="https://usegrometrics.com/g.js" data-site="YOUR_SITE_ID"></script>
2

Connect your Shopify store

In Grometrics, go to Settings → Integrations → Shopify and authorize the connection. This grants read access to orders — no write access, nothing changes in your store.

3

Verify orders are syncing

New orders should appear in Revenue within a few minutes of a purchase. Each order shows the linked visitor, their session history, and first/last-touch source.

Historical orders

Orders placed before the script was installed won't have a matching visitor session. Only orders from visitors tracked after install will show full attribution.

What happens next

Once orders are syncing, connect your ad platforms under the same Integrations page. The Attribution page will then show a comparison table — what each platform reported versus what Shopify actually recorded — with the gap flagged by severity. For interpretation, read the attribution mismatch guide.

Troubleshooting

Order count in Grometrics doesn't match Shopify's admin

Check the date range and timezone. Grometrics uses your site's configured timezone, which may not match Shopify admin's default. Also confirm refunded orders aren't being excluded on one side and included on the other.

A visitor's order shows Direct even though they came from an ad

This usually means the ad click and the purchase happened in different sessions more than 30 days apart, or the visitor cleared cookies between visits. Direct means no attribution data survived to reach the order.

Some orders show no visitor at all

Orders placed without a tracked session first, such as before the script was installed or through a checkout link outside your site, can't be matched. This is expected for historical orders synced from before setup.

Was this page helpful?