Google Analytics on Shopify: setup, and why revenue doesn't match

Set up GA4 on Shopify with the Google & YouTube app, turn on consent, check it in Realtime, remove duplicate tags, and know why GA4 revenue stays below Shopify's.

· 9 min read

To set up Google Analytics on Shopify, create a GA4 property with a web data stream, install the Google & YouTube app in your Shopify admin and connect that stream. The app then sends Shopify’s shopping events to GA4, from product views to checkout and purchase, with no code. Turn on Shopify’s cookie banner if you sell in regions that need consent, place a test order, and confirm in GA4’s Realtime report that each event arrives once.

GA4 revenue will still sit below Shopify’s sales afterwards. That gap is expected, and the last sections explain which part of it setup can fix.

What you need before you start

  • A GA4 property with a web data stream for your store’s domain. Shopify’s setup guide sends you to Google’s property and stream instructions and asks you to note the Tag ID (it starts with G-).
  • A store that is not password protected. Shopify says Google Analytics can’t track events until you turn off your online store’s private mode.

How to set up Google Analytics on Shopify, step by step

  1. Install the Google & YouTube app from the Shopify App Store. Shopify notes you don’t need to connect Google Merchant Center to use it for Analytics.
  2. Connect your GA4 web stream. On the app’s Overview page, find the section “Just want to set up Google Analytics 4”, click Get started, select your property and click Connect, then Confirm. Google calls this option “strongly preferred” in its Shopify setup article.
  3. Use the manual option only if you have to. The app’s Settings page has a Google tags section where you can add a tag ID by hand. Google keeps this for cases where you lack access to the property or need to send data to several properties.
  4. Link Google Ads if you run ads (Shopify’s last setup step), then verify and clean up old tags as described below.

What the Google & YouTube app sends to GA4

Google’s Shopify event reference lists the events the app maps from Shopify’s own customer events:

GA4 eventFires when a visitor
page_viewViews any page
view_item_listViews a collection page
view_itemViews a product page
searchRuns a search on the storefront
add_to_cartAdds a product to the cart
remove_from_cartRemoves a product from the cart
view_cartViews the cart page
begin_checkoutStarts checkout
add_shipping_infoEnters shipping or address details at checkout
add_payment_infoSubmits payment information
purchaseCompletes the purchase

It also sends standard events such as session_start and first_visit. Four details from the same reference matter later:

  • The purchase value excludes shipping and taxes. Since April 24, 2025, value on purchase and begin_checkout is the subtotal minus item and order discounts.
  • Currency defaults to USD if it isn’t set in the event data.
  • add_shipping_info may be missing. Google’s event reference ties it to Checkout Extensibility, and its checkout journey report article says Shopify stores must configure it themselves, so check that the Add shipping step isn’t empty.
  • The shopify_event_name parameter lets you filter out specific app events from GA4 reports if you don’t want them.

purchase is a key event by default in every GA4 property. If you enable Ads Personalization with a linked Google Ads account, GA4 also marks several more events as key events, including add_to_cart, begin_checkout, view_item and even session_start. Check Admin > Data display > Events after linking Ads, because your key events total will then count sessions and add to carts alongside orders.

  1. In your Shopify admin, go to Settings > Customer privacy and open Cookie banner. Shopify’s privacy settings page says new stores get the banner configured automatically for the UK and EEA when they have active markets there.
  2. Pick the regions, or leave Use automated settings on so the banner shows where your active markets require it.
  3. Leave consent mode to the integration. Google’s Shopify consent article says consent mode is enabled automatically once Shopify’s banner is on, and that with the Google & YouTube app and a configured consent platform, “consent mode should work automatically”.

If you use a third party consent app instead of Shopify’s banner, Google recommends one that integrates with Shopify’s Customer Privacy API. Shopify adds two warnings: use the same regions in Shopify and in the app, otherwise non-essential data can be processed before consent, and if consent isn’t synced to Shopify, pixels might not fire even after a visitor accepts.

Expect lower numbers once the banner is live. Shopify says data from those regions is collected only after consent, which can mean fewer sessions and lower metrics that rely on sessions. Mark the date you turned it on, so a drop that week isn’t read as lost demand.

How to check it works: Realtime and DebugView

Realtime is the quickest check. In GA4, open Reports > Realtime. It covers the last 30 minutes and has an “Event count by event name” card. Then:

  1. Open your store in a browser where you accepted the cookie banner.
  2. View a collection, a product, add it to the cart, open the cart, start checkout.
  3. Place a test order with Shopify’s test gateway or Shopify Payments test mode. Customers can’t place live orders while test mode is on, so switch it off afterwards.
  4. Watch each event name appear in Realtime. After one order, purchase should go up by one. Two means a duplicate tag.

DebugView shows each event in sequence, for your device only. Turn on debug mode with Tag Assistant, then open Admin > Data display > DebugView. Per Google’s DebugView article, the middle column shows events from the last 60 seconds and you can click an event to see its parameters, which is where you check value and currency on purchase. Events won’t appear if you declined analytics cookies, so accept the banner first.

Shopify keeps test orders out of its own reports, but its documentation doesn’t say they stay out of GA4, so note the time of yours. To keep debug mode traffic out of reports, create a developer traffic filter in Admin > Data collection and modification > Data filters and set it to Active (Google’s guide).

Common duplicate tag mistakes

A common way a Shopify setup goes wrong is counting events twice: an old tag keeps running after the app is installed. Google’s duplicate tag guide for Shopify lists where they hide:

WhereWhat to look forFix
theme.liquid (Online Store > Themes > Edit code > Layout)A gtag.js snippet or a Tag Manager container in the head, sometimes at the end of the bodyDuplicate the theme as a backup, then delete the block
Settings > Customer eventsA custom pixel containing a Google tag, often the one Shopify converted from PreferencesDisconnect it, then delete it

Shopify made Additional scripts view-only on August 28, 2025, and August 26, 2026 was the deadline for non-Plus stores to upgrade their Thank you and Order status pages. Once those pages are upgraded, code in Additional scripts or checkout.liquid stops working there, so Google says no manual removal is needed.

In the code editor, search for gtag, UA-, AW-, GTM-, googletagmanager.com and google-analytics.com. Don’t delete Shopify’s own Liquid objects such as {{ content_for_header }}. Shopify’s migration page offers a second check: in your browser’s developer tools, look for more than one request to the same analytics endpoint for a single page load.

Remove Google tags from custom pixels even when they don’t duplicate anything: Google says running them there is not a supported implementation.

Why GA4 revenue doesn’t match Shopify

Even a clean setup leaves a gap, for reasons that are about definitions rather than tags:

  • Shopify counts every order: its finance reports cover all sales channels by default, whether or not a script ran. GA4 only counts purchases its tag sent from a browser that allowed it.
  • GA4’s purchase value excludes shipping and taxes, so compare it with Shopify’s net sales (which exclude shipping and taxes), not total sales.
  • Declined cookies and browser extensions that block Google Analytics stop purchases from reaching GA4, as Shopify’s discrepancies page notes. Orders from other sales channels, such as point of sale, never touch your storefront’s tag at all.

Setup can only fix two things: a GA4 total above Shopify’s (a duplicate purchase tag, see above) and revenue in the wrong currency (check currency in DebugView). A GA4 total below Shopify’s is normal. What matters is that the gap stays about the same from week to week, and a gap that suddenly widens points to a broken tag.

For the full comparison of sessions, sales, conversion rate and which number to trust for which question, read Shopify Analytics vs GA4.

Once it’s running, watch the trend

A GA4 setup on Shopify can break quietly, for example when someone pastes a tracking snippet back into the theme or a consent app stops syncing, and nobody looks until month end. Check Realtime after every theme or checkout change, and before a big sale run through our Black Friday analytics checklist. If traffic does drop, the GA4 traffic drop checklist separates tracking problems from real ones.

If you would rather not open GA4 every day, this is what we built Dialytics for, so weigh this accordingly. It connects to GA4 (not Shopify) and posts a Monday digest in Slack on what moved in your traffic and key events, and why. Every morning it checks sessions, users, new users and the total of your key events against the same weekday in recent weeks, and alerts you only when one of them moves unusually. Since purchase is a key event by default, a broken purchase tag can show up there as a drop in key events, most clearly when purchases are a large share of your key events (not the case if Ads Personalization has made session_start a key event). It doesn’t read revenue or order values: sales stay a Shopify question.

Frequently asked questions

Do I need Google Tag Manager to use GA4 on Shopify?

No. The Google & YouTube app installs the Google tag and sends Shopify's shopping events, including checkout and purchase, without Tag Manager. Google says Tag Manager cannot be set up through the app, recommends moving tags out of containers on Shopify into the app, and calls Google tags inside a Shopify custom pixel unsupported.

Where did the Google Analytics field in Online Store Preferences go?

Shopify removed it. As of February 2025, Universal Analytics tags not set up through the Google app were taken out of the Preferences page and converted to custom pixels under Settings > Customer events. Google now points every Shopify store to the Google & YouTube app, so guides that still mention Preferences are out of date.

Why does GA4 show more purchases than Shopify?

Usually a duplicate tag. If the Google & YouTube app and a second Google tag, most often a custom pixel (sometimes one Shopify converted from an old Preferences setup), both send purchase, every order counts twice in GA4. Place one test order, then check Realtime: the purchase event count should go up by exactly one.

Does Shopify's cookie banner reduce what GA4 records?

Yes, in the regions where the banner shows. Shopify collects non-essential data only after a visitor consents, and warns that session counts and metrics built on sessions can drop. Google's consent mode is switched on automatically with Shopify's banner, so each visitor's choice is passed to Google.

Written by

Founder, Dialytics

Keep reading

Stop building the Monday report

Dialytics reads your GA4, posts the weekly digest in Slack, flags what actually moved, and answers follow-ups in the thread.

Start free trial

No credit card. 14 days free.