Connecting Shopify to Google Analytics 4 is one of the most valuable technical investments an e-commerce store can make. But for many merchants, it's also one of the most confusing. GA4's new data model, Shopify's evolving integration options, and the overlap between different tracking methods create a setup that can easily go wrong.
This guide simplifies it.
The Two Integration Paths
There are two main ways to connect Shopify and GA4:
1. Shopify's built-in GA4 integration (via Online Store → Preferences → Google Analytics), fastest to set up, good for stores with straightforward checkout flows and no custom tracking needs. Sends standard ecommerce events automatically.
2. Google Tag Manager (GTM). more work to configure, but gives full control over which events fire, when, and with what data. Recommended for stores running Google Ads, using custom checkout flows, or needing events beyond the standard ecommerce set.
For most growing stores, GTM is the right long-term choice.
The Events That Matter
Your GA4 setup needs to capture these ecommerce events to be useful:
- 'view_item', triggered when a product page is viewed
- 'add_to_cart', triggered when a product is added to cart
- 'begin_checkout', triggered when a customer starts checkout
- 'purchase', triggered on the order confirmation page, with revenue, items, and order ID
The 'purchase' event is the most important. Without it, you have no ecommerce revenue data in GA4.
Avoiding the Most Common Mistake
The single most common GA4 mistake for Shopify stores: enabling both Shopify's native integration AND a GTM purchase tag simultaneously. This causes double-counting of purchase events, making your revenue reports show 2x actual revenue.
If you use GTM, disable the native Shopify GA4 integration.
Verifying Your Setup
Before trusting your GA4 data for decisions, verify:
- Open GA4's DebugView and complete a test purchase (use a discount code for 100% off)
- Confirm the 'purchase' event fires exactly once with correct revenue and item data
- Cross-reference GA4 revenue with Shopify's revenue for the same 7-day period, they should be within 5% of each other
Once verified, your GA4 setup is a reliable foundation for every other analytics decision you'll make.