With the shift to Google Analytics 4, the old way of tracking e-commerce on Shopify is no longer effective. Worse, Shopify’s native GA4 integration is convenient, but it often misses crucial data or reports it incorrectly.
If you're running ads, you might be making expensive decisions based on flawed data. Here’s how to fix your setup using Google Tag Manager (GTM).
The Problem with Native Integration
Shopify's default GA4 connection often fails to:
- Accurately capture all purchase events, especially with express checkouts like Apple Pay.
- Pass detailed product information (like variants, categories, and margins) into GA4.
- Attribute sales to the correct marketing channel, especially with cross-domain checkouts.
The Solution: A GTM Data Layer
The gold standard is to implement a data layer on your Shopify store. This is a JavaScript object that pushes detailed e-commerce information (like product views and purchases) to GTM.
Your developer can add this to your theme, or you can use a third-party Shopify App like Elevar or Analyzify.
Your GTM Checklist for Accuracy
1. The Purchase Event
This is the most important one. Your \`purchase\` event in GTM should be configured to capture:
- ✓ `transaction_id`
- ✓ `value` (total order value)
- ✓ `currency`
- ✓ An `items` array with product details
2. Validate Everything in DebugView
Never assume your tracking is working. Use GA4's DebugView to follow your own user journey. Add a product to the cart, begin checkout, and complete a test purchase.
3. Solve Cross-Domain Attribution
Shopify checkouts happen on a different domain. To track this as a single session, you must enable cross-domain tracking in your GA4 admin settings.
4. Build Your Dashboard
Once the data is clean, connect GA4 to Looker Studio and build a simple dashboard showing Total Revenue, ROAS, and top-selling products.









