How to Add Google Analytics 4 to Your Shopify Store

You add Google Analytics 4 to Shopify by creating a GA4 property, then connecting it through Shopify's built-in Google & YouTube channel — no theme code needed for the basics. The whole setup takes about ten minutes, and once it's live you can see exactly where shoppers come from, what they view, and where they drop off. This guide covers the setup, the ecommerce events worth tracking, and the mistakes that quietly corrupt your data.
Clean analytics is the foundation of every growth decision. If you'd rather have it set up and verified properly from day one, our Shopify speed and SEO optimisation service includes analytics configuration. Otherwise, here's how to do it yourself.
What Is Google Analytics 4 — and Why It Matters for Shopify
Google Analytics 4 (GA4) is Google's event-based analytics platform that tracks how visitors interact with your store. Unlike the old Universal Analytics, GA4 records every action — page views, product views, add-to-carts, purchases — as events, which maps perfectly to how an ecommerce funnel actually works.
For a Shopify merchant, GA4 answers the questions that actually drive revenue: which channels bring buyers rather than just visitors, which products get viewed but not bought, and where shoppers slip out of the funnel. Skip it, and you're optimising your store blind — guessing at fixes instead of reading them off the data.
Before You Start: What You Need
Gather two things before setup, and the rest takes minutes. You need a Google account and admin access to your Shopify store. If you've used Google Analytics before, check whether you have a GA4 property or an old Universal Analytics one — Universal Analytics stopped processing data in 2023, so you may need to create a fresh GA4 property.
- A Google account (the same one you use for Google tools is fine).
- Admin access to your Shopify admin.
- A GA4 property — create one if you only have old Universal Analytics.
Step 1 — Create a GA4 Property
Start in Google Analytics by creating the property that will hold your store's data. Go to analytics.google.com, open Admin, and create a new GA4 property with your store name, time zone, and currency. Then add a web data stream using your store's domain — this generates the Measurement ID (it starts with G-) you'll connect to Shopify.
- Open Admin → Create Property in Google Analytics.
- Set the property name, your time zone, and INR as the currency.
- Add a web data stream with your store URL.
- Copy the Measurement ID (G-XXXXXXXXXX) — you'll need it next.
Step 2 — Connect GA4 to Shopify (the Native Way)
Use Shopify's official Google & YouTube channel — it's the cleanest connection and avoids code. In your Shopify admin, install the Google & YouTube sales channel, connect your Google account, and link your GA4 property. Shopify then sends ecommerce events to GA4 automatically, including purchases, without you editing the theme.
- In Shopify admin, go to Settings → Apps and sales channels.
- Add the Google & YouTube channel and connect your Google account.
- Select your GA4 property to link it.
- Confirm the Measurement ID matches the one from Step 1.
Step 3 — Verify the Connection Works
Always confirm data is flowing before you trust a single report. In GA4, open Reports → Realtime, then visit your store in another tab. Within a minute you should see yourself appear as an active user. If nothing shows after a few minutes, the connection didn't complete — recheck the Measurement ID and that the Google channel is fully connected.
Step 4 — Confirm Ecommerce Events Are Tracking
The events that matter most are the ecommerce ones, so test them directly. Place a test order and a few add-to-carts, then check GA4's Realtime and ecommerce reports for view_item, add_to_cart, begin_checkout, and purchase events. These four events power your entire funnel analysis, so confirm each one fires before relying on the data.
| GA4 event | What it tells you |
|---|---|
| view_item | Which products get attention |
| add_to_cart | Which products convert interest to intent |
| begin_checkout | Where the funnel narrows |
| purchase | Revenue, by source and product |
Want your analytics, speed, and SEO set up and verified by Shopify specialists?
Get Your Store OptimisedCommon GA4 Setup Mistakes on Shopify
Most broken GA4 data traces back to a handful of avoidable mistakes. Catch these and your reports stay trustworthy:
- Double-tracking — installing GA4 both through the Google channel and via manual theme code counts every event twice and inflates your numbers. Pick one method.
- Self-traffic not filtered — your own visits and your developer's pollute the data. Set up internal traffic filtering in GA4.
- No conversions marked — mark purchase (and begin_checkout) as key events so GA4 reports them as conversions.
- Wrong currency or time zone — set INR and your local time zone at property creation, or revenue and timing reports will mislead you.
- Trusting data on day one — give GA4 a few days of real traffic before drawing conclusions.
What to Do With Your GA4 Data
Analytics only pays off when it changes what you do. Once GA4 is collecting clean data, use it to find your biggest drop-off step, your best and worst traffic sources, and the products that get views but few sales. Each of those points straight at something to fix — usually speed, a product page, or the checkout.
If GA4 shows heavy drop-off at product or checkout pages, that's often a speed or UX problem, not a traffic one. A focused speed and SEO pass or conversion optimisation on the weak steps usually moves revenue faster than buying more traffic.
Your data shows the leak — ready to fix it and convert more of the traffic you already have?
Improve Your ConversionsFrequently Asked Questions
How do I add Google Analytics 4 to Shopify?
Create a GA4 property in Google Analytics, add a web data stream for your store, then connect it through Shopify's built-in Google & YouTube sales channel. Shopify sends ecommerce events to GA4 automatically, with no theme code needed for the standard setup. The whole process takes about ten minutes.
Is Google Analytics free for Shopify stores?
Yes. Google Analytics 4 is completely free for the volumes nearly every Shopify store generates, and Shopify's Google & YouTube channel is free to install. You only pay if you upgrade to GA4 360, which is enterprise-scale and unnecessary for almost all merchants.
Do I need to edit my theme code to install GA4?
No, not for the standard setup. Shopify's Google & YouTube channel connects GA4 and tracks ecommerce events without touching your theme. Manual theme-code installation is only needed for advanced custom tracking, and doing both at once causes double-counting.
Why is my GA4 not showing Shopify data?
The most common causes are a mismatched Measurement ID, an incomplete Google channel connection, or simply checking too soon. Open GA4's Realtime report and visit your store in another tab — if you don't appear within a minute, recheck the Measurement ID and reconnect the Google channel.
What ecommerce events should I track in GA4?
Track view_item, add_to_cart, begin_checkout, and purchase — these four map to your full funnel and reveal where shoppers drop off. Mark purchase and begin_checkout as key events so GA4 reports them as conversions, giving you revenue and funnel data you can act on.