
Quick answer
To set up Google Analytics on Shopify, create a GA4 property and web data stream, install the Google & YouTube app, and connect the property in the app. No code is needed. The app sends page, cart, checkout and purchase events for you. Then confirm one test order in Realtime, remove older tags and link GA4 to Google Ads.
Key takeaways
- Shopify and Google both route GA4 through the Google & YouTube app, and Google calls connecting your property there the strongly preferred option over adding a tag by hand.
- The GA4 purchase value from the app is subtotal minus discounts, with tax and shipping sent separately, so it will not match Shopify's Total sales on orders with tax or shipping.
- Google Ads reports a purchase on the date of the click and GA4 on the date of the purchase, so daily numbers differ even when both are correct.
- Keep one Primary purchase action in Google Ads, because an imported GA4 purchase set to Primary beside the app's purchase counts every order twice.
- Shopify says Google Analytics won't fire in Google AI Mode and Gemini's direct checkout, so those orders reach Shopify without a GA4 purchase event.
On this page
- How do you add Google Analytics to Shopify?
- What does the Google & YouTube app track in GA4?
- Do older GA4 install methods still work on Shopify?
- How do you check GA4 with Realtime and DebugView?
- How do you stop double counting in GA4 on Shopify?
- Why don't GA4 and Shopify numbers match?
- Why are GA4 and Google Ads numbers different?
- How do you link GA4 to Google Ads?
- Which GA4 settings should you change after setup?
- When should you get help with GA4 on Shopify?
- FAQ
How do you add Google Analytics to Shopify?
Add Google Analytics to Shopify by connecting a GA4 property inside the Google & YouTube app. You don't paste any code. Shopify's GA4 setup guide and Google's Shopify tag guide both use this route, and Google says the integration is free.
You need a Google account, a Google Analytics account and a GA4 property with a web data stream for your store. Shopify says you don't have to connect Merchant Center to finish the GA4 setup, so the product feed can wait.
- Create the property. In Google Analytics, create a GA4 property, then add a web data stream for your store's domain. Note the Tag ID, which starts with
G-. - Install the app. In your Shopify admin, search for "Google and YouTube", open the listing in the Shopify App Store and click Install. Shopify calls it a sales channel and Google calls it an app.
- Connect the property. On the app's Overview page, find "Just want to set up Google Analytics 4" and click Get started. Pick your property under "Your Google Account", click Connect, then Confirm.
- Remove older tags. Google tells you to remove legacy tags to prevent duplicate measurement. The double counting section below shows where they hide.
- Test one order. Check it in Realtime and DebugView before you trust any report.
Google lists one alternative: add the Tag ID by hand in the app under Settings › Google tags › Manage. Google says the connect option "is strongly preferred" and keeps manual tags for cases such as not having the right access or sending data to more than one GA4 property.
What does the Google & YouTube app track in GA4?
The app sends 11 named events, mapped from Shopify's standard events, plus session_start, user_engagement and first_visit, per Google's Shopify event reference. That covers the path from first page view to paid order, so most stores need no extra tagging for GA4.
| Stage | GA4 events | What you learn |
|---|---|---|
| Browse | page_view, view_item_list, view_item, search | Which pages, collections and products get attention, and what people search for |
| Cart | add_to_cart, remove_from_cart, view_cart | Which products start a purchase and which get dropped |
| Checkout | begin_checkout, add_shipping_info, add_payment_info | Where people leave before paying |
| Order | purchase | Transaction ID, value, currency, tax, shipping, coupon and items |
- Purchase value. Since April 24, 2025, the app's
valueis subtotal minus discounts. Tax and shipping travel in their own parameters. - Key events. Google lists
purchaseas a default key event, so you don't need to mark it yourself. - Newer events. Google's setup page flags
view_item_list,remove_from_cart,view_cartandadd_shipping_infoas newer. If you want them out of a report, filter on theshopify_event_nameparameter.
The list has no refund event and no custom actions, such as a click on a size chart. Those need a separate setup.
Do older GA4 install methods still work on Shopify?
Mostly not. Older guides that paste a Google tag into theme files or checkout describe a Shopify that has changed. Following them now gives you partial data or a second tag beside the app.
| Method | Status, November 2026 | What goes wrong |
|---|---|---|
| Google & YouTube app | The route Google and Shopify document | Nothing, if it is the only GA4 source |
Tag pasted into theme.liquid | Runs on storefront pages only | It never sees checkout or the order, and it doubles events beside the app |
| Additional scripts box | Sunset for the Thank you and Order status pages on August 28, 2025 | The purchase snippet no longer runs |
| Online Store › Preferences field | Deprecated by Shopify | Tags not moved by February 2, 2025 were converted to a custom pixel, which Google says may cause discrepancies |
| Google tag in a custom pixel, directly or through Tag Manager | "Not a supported implementation," says Google | Automatically collected events, enhanced measurement and Tag Assistant may not work correctly |
Those limits come from Google's custom pixel page, Shopify's developer docs and Google's migration guide, which says to move Google tags out of Tag Manager containers on Shopify and configure them in the app. If you still run Tag Manager for other tools, our guide to Google Tag Manager on Shopify explains where it can load.
How do you check GA4 with Realtime and DebugView?
Turn on debug mode, place one test order, then confirm the purchase in Realtime and read its value in DebugView. Realtime needs no setup and shows the last 30 minutes. DebugView shows each event from your device as it arrives.
- Confirm the pixel. In Shopify, open Settings › Customer events. Confirm the Google & YouTube pixel is listed and note any custom pixel that loads Google tags.
- Turn on debug mode. Pause ad blockers, open Tag Assistant and enter your store's URL. Tag Assistant adds a parameter to the address that turns on debug mode, per Google's DebugView guide.
- Place a test order. In the tab that opens, check out with Shopify's test payment gateway or Shopify Payments test mode, as its test order guide shows. You aren't charged, and test orders stay out of Shopify's reports.
- Open Realtime. In GA4, go to Reports › Realtime. Find
purchaseon the "Event count by event name" and "Key events by event name" cards. Google's data freshness page says Realtime typically takes a few minutes. - Open DebugView. In GA4, go to Admin, then DebugView under Data display. Click the
purchaseevent and read its parameters. - Wait before judging reports. Google says data processing can take 24 to 48 hours, so an empty standard report on day one proves nothing.
page_viewappears once for each page loadadd_to_cartandbegin_checkoutfire on the matching step- One order produces one
purchase valueequals the items minus discounts, with no tax or shippingcurrencymatches the store, andtransaction_idisn't empty
Does DebugView work with the app? Some guides say Tag Assistant can't reach Shopify pixels. That fits custom pixels, where Google lists Tag Assistant among the features that may fail. The app behaved differently when we loaded a live Shopify store running it on November 6, 2026: its Google tag ran on the page itself, and Google's debug script loaded once the debug parameter was in the URL. We tested a page load, not a checkout, so if a checkout event doesn't show in DebugView, go by Realtime.
How do you stop double counting in GA4 on Shopify?
Keep one route into GA4: the Google & YouTube app. Double counting starts when a second tag sends to the same G- Tag ID, such as an old theme snippet, a GA4 tag in a Tag Manager container or a leftover custom pixel. Google's duplicate events guide says one action can be counted more than once if you have multiple Google tags set up.
GA4 protects purchases but not other events. Google's transaction ID page says purchase events with the same transaction ID are deduplicated. It describes no such rule for page views or cart events, so order counts can look right while page views run double.
- Search your theme. In Online Store › Themes › Edit code, search
theme.liquidfor yourG-ID,gtagandgoogletagmanager. Back up the theme before you delete anything. - Check custom pixels. In Settings › Customer events, disconnect any custom pixel that sends to GA4, including one Shopify created from the old Preferences field.
- Check Tag Manager and apps. Look for GA4 tags using the same ID in any container, and for third-party analytics apps that add their own tag.
- Confirm with Hits sent. In Tag Assistant, click your Google tag, open its summary and choose Hits sent. Each box is labeled with the Google product that received the event, so one page load should show one GA4 page view.
Why don't GA4 and Shopify numbers match?
GA4 and Shopify won't match because Shopify records every order and GA4 records what a browser reports, and the two define revenue differently. A steady gap is normal. A gap that suddenly widens points to a tracking problem.
For example, a store selling candles takes one order: $60 of items, a $6 discount code, $5 shipping and $4.32 tax.
$60 subtotal − $6 discount = $54$54 net sales + $5 shipping + $4.32 tax = $63.32Both numbers are right. Shopify's analytics fields reference defines Total sales as net sales plus fees, duties, shipping and taxes. Net sales also subtracts sales reversals such as returns. So compare GA4 revenue with gross sales minus discounts, not with Total sales.
GA4 also sees fewer orders, for these reasons:
- Browsers and cookies. Shopify's discrepancies page says Google counts only visitors with JavaScript and cookies on, and browser extensions can block tracking.
- Consent. Google's Shopify consent guide says consent mode turns on automatically once your banner is enabled. If you sell into the EEA or the UK, our Consent Mode v2 setup covers that side.
- Orders that skip the pages. Shopify's pixels page says pixels load on the storefront, checkout, Thank you and Order status pages. Point of Sale orders and orders you enter by hand in the admin don't pass through those pages.
- AI Mode and Gemini orders. Shopify's direct checkout page says Google Analytics and custom pixels "won't fire" there, because that checkout fires only server-to-server pixels. GA4 gets no purchase from those orders.
- Time zones. Shopify lists different reporting time zones as a cause.
- Refunds. With no
refundevent in the app's list, a refunded order stays in GA4 revenue while Shopify subtracts it from net sales.
Watch for a late September shift. Shopify rolled out a new session count from September 21 to 23, 2026. Sessions now follow continued activity and end after 30 minutes without any, identified bot sessions are filtered out by default, and some sessions with no page view are counted. Shopify says orders and sales aren't affected, but its session update page says conversion rate can change. If Shopify's rate moved then and GA4's didn't, this is the likely reason.
Why are GA4 and Google Ads numbers different?
GA4 and Google Ads differ because they answer different questions. Google Ads reports the purchases it can tie to a Google ad, on the date of the click. GA4 reports every purchase it sees from every channel, on the date of the purchase. Google says these differences are "common and can occur for several reasons, even with a correct setup."
| Reason | Google Ads | GA4 | What to do |
|---|---|---|---|
| Date | Date of the ad click | Date of the purchase | Use the All conv. (by conv. time) column |
| Who gets credit | Google Ads sources only | Paid and organic channels, or Google paid channels, by property setting | Filter GA4 to Google Ads traffic before you compare |
| Time limit | Conversion window of 1 to 90 days | Lookback of 30, 60 or 90 days, with 90 as the default | Check both settings first |
| Data behind it | The tag, Shopify's Data Manager import and modeled conversions | Events reported by the browser | Don't expect GA4 to catch every purchase Google Ads shows |
| Counting | One or Every, per click | Each event | Use Every for purchases |
| Traffic | Clicks, with invalid clicks filtered out | Sessions, with no such filter | Never expect clicks to equal sessions |
| Timing | Imported conversions arrive up to 24 hours later | Processing can take 24 to 48 hours | Compare closed days, a few days back |
Sources: Google's GA4 conversions page, clicks and sessions guide and attribution settings page. Google's Shopify Data Manager page describes server-to-server purchases sent to Google Ads and doesn't mention Google Analytics.
Watch for key event totals. Compare the purchase event, not GA4's total key events. Google says that when you enable ads personalization with a linked Google Ads account, events such as add_to_cart, begin_checkout, session_start and view_item are also marked as key events. That total can run far above your orders.
Google also separates two terms: a key event feeds GA4's behavior reports, and a conversion measures ads and sets bids, per its key events page. Our Google Ads conversion tracking guide covers windows and counting in depth.
How do you link GA4 to Google Ads?
Link them in GA4 under Admin › Product links › Google Ads links. You need Editor access or above in Analytics and admin access in Google Ads. Google's linking guide says Google Ads data reaches GA4 reports within 48 hours, and its clicks and sessions guide says data won't fill in backward.
- Start the link. In Admin, under Product links, click Google Ads links, then Link.
- Choose the account. Click Choose Google Ads accounts, select yours, click Confirm, then Next.
- Review the options. Enable Personalized Advertising is on by default. Expand Enable Auto-Tagging to turn auto-tagging on or leave it as it is.
- Submit. Click Next, review the settings and click Submit.
The link lets you use GA4 audiences in Google Ads, as our Google Ads remarketing guide explains. A related change: since June 15, 2026, Consent Mode in Google Ads is the single control for the Google Ads cookies and IDs that GA4 collects. Google's data controls update says the Google signals switch now covers only behavioral reporting, and a similar change to ads personalization is planned for later in 2026.
Should you import the GA4 purchase into Google Ads?
Not as a second Primary action. When you connect Google Ads to the app, it already suggests purchase, add to cart and checkout started conversions. An imported GA4 purchase adds a second action for the same order, and Google's Analytics enhanced conversions page says to "only use one conversion as your primary goal, to prevent double counting the same conversion in your campaigns."
Conversions created in the GA4 interface start as Secondary, so they stay out of bidding until you change them in Google Ads. Check any action created from the Google Ads side in Goals › Conversions › Summary.
We keep the app's purchase as Primary and use GA4 for reports and audiences, for two reasons. Google says the app's setup is what activates Shopify's Data Manager import. And Google's pages disagree on enhanced conversions for imports. Its Google Ads setup page says conversions from importing Google Analytics goals "aren't supported for enhanced conversions." The Analytics page above, marked as an open beta, says enhanced conversions are "automatically shared" with the Google Ads account once user-provided data collection is set up. Our guide to enhanced conversions covers the native setup, and our Google Ads for Shopify guide covers the rest of the app.
Which GA4 settings should you change after setup?
Change three things: match the time zone to Shopify, set data retention to 14 months, and list any payment domain as an unwanted referral.
- Time zone and currency. Match both to Shopify in your property settings, so daily totals line up.
- Data retention. In Admin, under Data collection and modification, open Data retention. Standard properties offer 2 or 14 months. Google's retention page says this affects explorations and funnel reports, not standard reports.
- Unwanted referrals. Open your web stream under Data streams, click Configure tag settings, then Show all, then List unwanted referrals. Google's referrals page names third-party payment processors as a use. If purchases show a payment site as their source, add that domain.
When should you get help with GA4 on Shopify?
Get help when GA4 purchases stay far below Shopify after you remove extra tags, when the app and a Tag Manager setup overlap, or when bidding depends on numbers you can't reconcile.
We set up and audit Shopify tracking for stores on Google Ads. See our Google Ads conversion tracking service, or start with a free Google Ads audit, where we tell you whether we found what is breaking your purchase data.
Frequently asked questions
Does Shopify support Google Analytics 4?
Yes. Shopify supports GA4 through the Google & YouTube sales channel, which installs the Google tag and sends store events to your GA4 property. You create the property and web data stream in Google Analytics, then connect the property inside the app. Events such as add to cart, begin checkout and purchase then reach GA4 without any code in your theme.
Is Google Analytics free on Shopify?
Yes. Google says you can integrate your Shopify account with Google Analytics for free, and you need a valid Google sign-in and an active Shopify account. Google Analytics 360 is a separate paid product, and the setup in this guide doesn't require it. If you link Google Ads and run campaigns, you pay for those ads.
Where do I add the Google Analytics code in Shopify?
You don't add code. Connect your GA4 property in the Google & YouTube app, and the app loads the Google tag for you. Old advice to paste a snippet into theme.liquid or the Additional scripts box is out of date. Theme code never loads on checkout, and a second tag beside the app double counts page views and cart events.
Do I need Merchant Center to add GA4 to Shopify?
No. Shopify says you don't have to connect to Google Merchant Center to complete the GA4 tag setup. The Google & YouTube app handles product feeds too, but that part is separate, so you can connect GA4 alone and come back to Merchant Center later. In the app, look for the section that offers to set up Google Analytics 4 alone.
Does Shopify have built-in analytics, and do I still need GA4?
Yes, Shopify has built-in Analytics and Reports, and they are your record for orders and sales. GA4 adds what Shopify doesn't: event-level paths through your store, funnels you build yourself, and audiences you can use in Google Ads once the accounts are linked. Run both. Use Shopify for money and GA4 for behavior.
Why is GA4 not showing purchases from Shopify?
Start with a test order and watch Realtime. If page views arrive but purchase doesn't, those page views may come from an old theme tag while the app isn't connected to the property. If nothing arrives, confirm the connection in the app and accept the cookie banner on your test visit. Standard reports lag, because Google says processing can take 24 to 48 hours.
How long does GA4 take to show Shopify data?
Realtime typically shows events within a few minutes, and DebugView shows them as they happen for a device in debug mode. Standard reports take longer. Google says data processing can take 24 to 48 hours, so judge a new setup from Realtime and wait a few days before comparing GA4 revenue with Shopify.
Can Shopify send data to two GA4 properties?
Yes. Connect your main property normally, then open the Google & YouTube app's Settings page, click Manage in the Google tags section and add the second Tag ID by hand. Google names this as the case for manual tags. Connecting a property is still the preferred route, so use the manual option only for the extra property.
Sources32 references
- Shopify Help Center: Setting up Google Analytics 4
- Analytics Help: Shopify: Set up your Google tag
- Google for Developers: Shopify event parameters
- Analytics Help: Mark events as key events
- Analytics Help: Limitations of using a custom pixel for conversion measurement on Shopify
- Tag Manager Help: Migrate your Google tags with the Google & YouTube app on Shopify
- Shopify Help Center: Reviewing and replacing additional scripts on your Thank you and Order status pages
- Shopify developer docs: checkout.liquid
- Shopify Help Center: Pixels overview
- Shopify Help Center: Placing a test order
- Analytics Help: Realtime report
- Analytics Help: Monitor events in DebugView
- Analytics Help: Data freshness
- Google Merchant Center Help: How to avoid duplicated tracking events (Google & YouTube app on Shopify)
- Analytics Help: Minimize duplicate key events with transaction IDs
- Shopify Help Center: Analytics discrepancies
- Shopify Help Center: Changes to sessions and conversion rate in Shopify Analytics
- Shopify Help Center: Analytics data points (fields) reference
- Shopify Help Center: Selling on Google AI Mode and Gemini
- Analytics Help: Set up Shopify to obtain user consent
- Google Ads Help: Create conversions from Google Analytics events in Google Ads
- Google Ads Help: Clicks and Sessions Discrepancy for Google Ads and Google Analytics
- Analytics Help: Select attribution settings
- Analytics Help: Conversions vs. key events in Google Analytics
- Google Ads Help: Shopify (Data Manager connection)
- Analytics Help: Connect Google Ads to Google Analytics
- Analytics Help: Enhanced conversions in Google Analytics
- Google Ads Help: Set up enhanced conversions for web using the Google tag
- Analytics Help: Updates to Google Analytics Data Controls
- Analytics Help: Data retention
- Analytics Help: Identify unwanted referrals
- Logical Gecko test: page load on a live Shopify store running the Google & YouTube app (checked November 6, 2026)




