GA4 on Shopify: Connect, Respect Consent, Check the Data

To set up GA4 on Shopify, create a Google Analytics 4 property with a web data stream, install Shopify’s Google & YouTube sales channel, and connect the GA4 tag through it; Shopify then sends the standard ecommerce events, such as product views, add-to-cart and purchases, automatically. Before you trust the numbers, set up consent, check the events with a test order, and expect GA4 and Shopify’s own reports to differ.
Connect GA4
The steps follow Shopify’s Help Center page on Google Analytics setup, read on October 23, 2026:
- Google account and Analytics account. Use an existing Google account or create one, then create an Analytics account.
- GA4 property and web data stream. Create a GA4 property (or move one you already have) and a web data stream for your store’s domain. Note the Tag ID.
- Install the Google & YouTube channel. If it is not installed, Shopify prompts you during the GA4 setup. You do not need to connect Google Merchant Center to finish the GA4 part.
- Set up the Google tag by following Google’s own Shopify instructions from the channel, with your Tag ID.
- Link Google Ads to the GA4 property if you advertise, so you can measure key events and build audiences.
The same page notes that GA4 cannot track events while your online store is in private mode, so tracking starts only after launch. If you added GA4 by pasting code into your theme in the past, also remove that code once the channel’s tag is live, so the same visit is not sent twice.
Consent and the cookie banner
GA4 is a tracker, so where the law requires consent, it must wait for it. Shopify’s pixels manager page says that in markets set to require consent, usually the EEA and the UK, pixels run only after visitors grant the permissions they need, and new pixels require Marketing and Analytics by default. The cookie banner itself is set under Settings > Customer privacy, together with your privacy policy and the data sales opt-out page.
Visitors who decline cookies are not in GA4, so expect GA4 to show fewer users and sessions from consent-required countries. And anything you add outside Shopify’s tools, such as a tag manager pasted into the theme, must respect the same consent, through a cookie app integrated with Shopify’s Customer Privacy API. Describe GA4 in your privacy policy; the EU side is in cookie banner and GDPR.
Check it works
- In GA4, open DebugView or the Realtime report.
- Visit your store from a browser where you accepted cookies, view a product, add it to the cart and complete a test order (refund it afterward).
- Browse a product, add it to the cart and place a test order, then check that the matching events arrive, with the order value and currency on the purchase.
- Compare the test order’s value in GA4 with the order in Shopify.
If no purchase arrives, check that the store is not in private mode, that the Google & YouTube channel shows the tag as connected, and that no old GA code is still in the theme.
Why GA4 and Shopify differ
GA4 and Shopify count different things in different ways, so a gap in sessions or orders between them is expected and does not by itself mean the setup is broken:
- Consent: GA4 sees only visitors who allowed tracking; Shopify’s own analytics count sessions differently.
- Sessions: Shopify rolled out a new session measurement from September 21 to 23, 2026, and GA4 has its own session rules.
- Orders: Shopify’s sales reports include orders from all your sales channels, while GA4 sees only the online purchases its tag recorded.
- Ad blockers stop GA4 in some browsers and do not affect Shopify’s order count.
Use Shopify for sales and orders, GA4 for traffic sources and journeys across sessions, and judge trends within one tool rather than comparing totals across them. Reading Shopify’s own reports is covered in Shopify analytics, and which numbers to trust for ad spend in ad metrics. More operations guides, including analytics, are in the running a store hub.
Frequently asked questions
Do I need Google Tag Manager? For the standard ecommerce events, no tag manager is needed: the Google & YouTube channel sends them. Google Tag Manager runs on Shopify as a custom pixel inside Shopify’s sandbox, which Shopify documents, and it suits stores that need custom events or several tags.
Does Shopify send purchase events to GA4? Shopify’s Help Center says certain ecommerce events are tracked automatically once the GA4 tag is set up through the Google & YouTube channel, including purchases. Check them with a test order in GA4’s DebugView.
Why are GA4 sessions lower? Visitors who decline cookies, ad blockers and different session rules all reduce what GA4 records compared with Shopify. Compare trends within each tool rather than totals between them.