A store owner reviewing colorful charts and graphs on a laptop screen showing website traffic data, with green accents

How to Add Google Analytics to Shopify: GA4 Setup

To learn how to add google analytics to shopify, install the Google and YouTube channel from the Shopify App Store, connect your Google account, then pick your GA4 property in the setup banner and click Connect. Events start flowing once the link is live.

By the Dropship Stair team. Last reviewed: November 2026.

Key takeaways

  • How to add google analytics to shopify means connecting a GA4 property to your store through the Google and YouTube channel, so Shopify sends ecommerce events to GA4 on its own.
  • Set up the GA4 property and web data stream first, and note the Tag ID starting with G, so you can confirm the right property is connected.
  • Use one tracking method only, because running the channel and a manual tag together sends the same event twice and GA4 counts it twice.
  • Place a test order after setup and check GA4 Realtime, because a live event is the only proof the link works.
  • Expect GA4 revenue to sit below Shopify sales, since ad blockers, consent choices, and refunds all shrink what GA4 sees.

What do you need before you start?

You need a GA4 property with a web data stream before you touch Shopify. Universal Analytics is retired, so GA4 is the only version that matters now. Create the property at analytics.google.com, add a web data stream for your store URL, and note the Tag ID that starts with G. You also need a Google account with admin access to that GA4 property, because the connection step will ask you to pick the property from your own account.

Give each store its own GA4 property, or the numbers will mix traffic from two stores and you will never trust a report again. If a teammate created the property, ask them to grant admin access first, because a viewer cannot approve the connection.

How do you add Google Analytics to Shopify with the Google and YouTube channel?

The Google and YouTube channel is the recommended method, and it is the one Shopify supports for GA4. Install it from the Shopify App Store, then open it from your Shopify admin under Sales channels. Connect the Google account that has admin access to your GA4 property. Then look for the banner that says Looking only to set up Google Analytics 4, click Get started, select your GA4 property, and click Connect.

Go slowly through that banner step. Click Get started, pick the property you created for this store, check that the Tag ID matches the one you noted, and click Connect. If the list is empty, the Google account has no GA4 property or lacks admin access, so fix that first. Once confirmed, Shopify sends ecommerce events to GA4 on its own, with no code to paste and no checkout edits. If you are following a store launch checklist, add the GA4 connection to it, because a store that launches without analytics loses its first weeks of learning.

What events does Shopify send to GA4 automatically?

The channel sends the main ecommerce events without any extra setup: view_item when a shopper views a product, add_to_cart when they add it, begin_checkout when they start checkout, add_payment_info when they add payment details, and purchase when the order goes through. Those five events cover the funnel from first product view to paid order, which is enough to see where buyers drop off and which products pull their weight.

One detail matters for the purchase event. Since April 24, 2025, the purchase value Shopify sends is the subtotal minus item and order discounts, with shipping and taxes left out. That explains part of the gap between GA4 revenue and Shopify sales, so do not expect the two totals to match to the dollar. Learn to read these five events first, then add custom tracking only when you have a clear question it would answer. A related guide on Shopify analytics for beginners walks through the reports to check each week once the data starts coming in.

Should you use Google Tag Manager instead?

Google Tag Manager gives you more control, but also more ways to break things. You set up a custom pixel in Shopify under Settings, then Customer events, and manage tags from Tag Manager. That path suits a store that needs custom events, or a team that already runs Tag Manager for other tools.

The tradeoff is simple. The channel is simpler and harder to get wrong, while Tag Manager is flexible and easier to get wrong. If you do not have a clear reason to need Tag Manager, use the channel. If you do choose Tag Manager, pick one method and stick with it. Never send the same event from both the channel and Tag Manager, because GA4 will count it twice and your purchase numbers will look better than reality.

Setup method Best for What it tracks Watch out for
Google and YouTube channel Most stores, and anyone who wants a fast setup view_item, add_to_cart, begin_checkout, add_payment_info, and purchase, sent automatically Pick the wrong GA4 property and your data lands in the wrong place
Google Tag Manager with a custom pixel Stores that need custom events or already use Tag Manager Standard ecommerce events plus any custom events you build Running it with the channel doubles events, so use one method only
Manual code in the theme or checkout No one, for a new setup Whatever you code by hand, with no automatic ecommerce events The old Additional scripts and checkout.liquid path is deprecated, so do not build on it

The verdict is plain. Start with the Google and YouTube channel unless you already know you need Tag Manager for a specific job. You can switch later if your needs change, but switching means removing the old method cleanly first, then testing again from scratch.

How do you check that GA4 is actually working?

Place a test order, then check GA4 Realtime. That is the check that counts, because a green tick in Shopify does not prove events are arriving. Buy your cheapest product and watch the Realtime view while you do it. You should see yourself as an active user, and the purchase event should appear within seconds. For a closer look, use DebugView in GA4 with the Google Analytics Debugger extension or Tag Assistant. DebugView shows each event as it fires, so you can confirm the purchase value and product details look right.

Two settings can quietly block your test. First, turn off storefront password protection before testing, because GA4 cannot collect events while it is on. Second, turn on Shopify’s cookie banner if you sell into regions that need consent, because buyers who decline cookies will not be tracked. Once the test order checks out, refund it in Shopify so it does not pollute your sales reports. A store audit checklist is a good place to record that the GA4 test passed, so the next person who touches the store does not have to guess.

Why does GA4 show less revenue than Shopify?

GA4 revenue will usually sit below Shopify sales, and that gap is expected. Ad blockers stop some visits from being tracked at all, some buyers decline cookies on the consent banner, and refunds change the final total after the purchase event has already fired. None of those mean your setup is broken. They mean GA4 and Shopify count different things.

Shopify records the order itself, so it is the source for sales truth. GA4 is better at showing the path a buyer took before the order, which pages they viewed and where they left. Use each tool for what it does best, and stop chasing a perfect match between the two totals. Compare the same date range in both tools, and compare weeks, not single days. If you want help reading those weekly numbers, the guide on improving your Shopify conversion rate shows which levers to pull once you know where buyers drop off.

What mistakes should you avoid?

The most common mistake is running two tracking methods at once. It is tempting to add Tag Manager on top of the channel, just in case, but that is how you end up with doubled purchases and reports you cannot trust. Pick one method, remove the other completely, and test again. The second mistake is building on the old way. The old Additional scripts and checkout.liquid method is deprecated. Checkout.liquid was deprecated on August 13, 2024 for the info, shipping, and payment pages, and on August 28, 2025 for the Thank you and Order status pages. Additional scripts became view only on August 28, 2025, and August 26, 2026 was the deadline for non Plus stores to upgrade the Thank you and Order status pages.

The third mistake is skipping the test order. Setup screens can look finished while nothing is flowing, and the only way to know is to buy something and watch it land in GA4. The fourth is leaving the storefront password on while you test, which blocks events entirely. The fifth is ignoring the cookie banner. If you are still setting the store up, the checkout optimization guide pairs well with this setup, since checkout is where the most valuable GA4 event fires.

What should you do next?

Once the test order shows up in Realtime, your setup is done, and the real work starts. Check GA4 once a week, not once an hour, and look for one thing to fix each time. A product with views but no adds to cart needs a better offer or better photos. A checkout with many starts but few purchases needs a look at shipping costs or payment options. Keep the habit small: one weekly check, one fix, one note on what changed. If you ever change the tracking method, or hand the store to someone new, run the test order check again. For a wider view of getting a store off the ground, the guide on how to start dropshipping on Shopify covers the steps around this setup, from picking products to launching.

Frequently asked questions

Do I need Google Tag Manager to add GA4 to Shopify?

No, you do not need Google Tag Manager to add GA4 to Shopify. The Google and YouTube channel is the recommended path, and it sends the main ecommerce events on its own. Use Tag Manager only if you want custom events or extra control over what fires.

Why is my GA4 revenue lower than my Shopify sales?

GA4 revenue often sits below Shopify sales, and that gap is normal. Ad blockers stop some visits from being tracked, some buyers decline cookies, and refunds can change the total. Shopify records the order itself, so use it as the source for sales truth and use GA4 to study behavior.

Can I use the old Additional scripts method for GA4?

No, you should not use the old Additional scripts method for GA4. Shopify deprecated checkout.liquid and made Additional scripts view only on August 28, 2025, with an upgrade deadline of August 26, 2026 for non Plus stores. Use the Google and YouTube channel or a custom pixel instead.

How long does it take for GA4 data to show up?

Realtime data can show up within seconds of a visit, so a test order is the fastest way to confirm the link works. Standard reports take longer, often up to a day, before numbers settle. If Realtime stays empty after a test order, check the connection and the password setting.

What events does Shopify send to GA4 automatically?

The Google and YouTube channel sends the main ecommerce events on its own, including view_item, add_to_cart, begin_checkout, add_payment_info, and purchase. Since April 24, 2025, the purchase value sent is the subtotal minus item and order discounts, with shipping and taxes left out.

Last reviewed: November 2026.

Share the post

Scroll to Top