How to Connect Google Analytics to Shopify (GA4 Setup Guide)
Google Analytics 4 is the free way to see where your Shopify traffic comes from, how visitors move through your store, and what's driving sales. The setup is more straightforward than it used to be — you don't need to touch code. This guide walks through connecting GA4 to Shopify step by step, then shows the easiest way to make sense of the data once it's flowing.
Before you start
You'll need two things:
- A Shopify store you're an admin on.
- A Google Analytics 4 property. If you don't have one yet, create it free at analytics.google.com — you'll get a Measurement ID that looks like
G-XXXXXXXXXX.
Step 1 — Create your GA4 property and grab the Measurement ID
In Google Analytics, go to Admin → Data Streams → Web, add your Shopify store URL, and Google generates a Measurement ID (G-XXXXXXXXXX). Keep it handy — Shopify needs it.
Step 2 — Connect GA4 to Shopify
The cleanest route is Shopify's official Google & YouTube channel:
- In your Shopify admin, go to Settings → Apps and sales channels.
- Install the Google & YouTube app if you haven't already.
- Open it and connect your Google account.
- Link the GA4 property that matches your store.
Shopify then sends purchase and behaviour data to GA4 automatically — no theme code editing, and it survives theme changes.
Step 3 — Confirm data is flowing
Give it 24–48 hours, then open GA4 → Reports → Realtime. Place a test order or browse your store and you should see the activity appear. If nothing shows after two days, re-check that the Measurement ID in the Google & YouTube app exactly matches your GA4 web stream.
The hard part isn't the setup — it's the reports
Here's what nobody warns you about: connecting GA4 is the easy 10 minutes. Actually using it is where most store owners get stuck. GA4's interface is dense, the terminology is its own language, and answering a simple question — "which channel drives my most valuable customers?" — can mean clicking through five menus and still second-guessing the number.
That's the problem Ask AI solves. Connect your GA4 (and Shopify) and just ask:
- "Where did my highest-value orders come from last month?"
- "Is organic traffic converting better or worse than paid?"
- "Which landing pages lose the most visitors before checkout?"
You get the answer in plain English — no exploring reports, no GA4 jargon. And because Ask AI reads Shopify alongside GA4, it reconciles the gap between GA4's numbers and your real Shopify sales instead of leaving you to guess.
FAQ
Do I need to edit code to add Google Analytics to Shopify?
No. Shopify's Google & YouTube channel connects GA4 without touching your theme code, and it keeps working after theme updates.
Is Google Analytics free for Shopify?
Yes — Google Analytics 4 is free. You only pay if you later choose a tool to help you analyse the data.
Why don't my GA4 numbers match my Shopify sales?
They rarely match exactly. GA4 relies on browser tracking, which is blocked by ad-blockers and cookie rejections, and usually undercounts revenue by 15–40%. Use Shopify as the source of truth for sales and GA4 for traffic and behaviour. Ask AI uses the right source for each so you're not comparing apples to oranges.
Can I see Google Analytics and Shopify data together?
Yes. Ask AI reads both sources, so you can ask a single question spanning traffic and sales — like which source drove the most net revenue after refunds.
Connect the tools in this guide
See how Ask AI pulls each source into Claude, ChatGPT, or Gemini.