Setting up Google Analytics on Shopify sounds simple. Paste a tracking ID, done. In practice, a misconfigured setup is often worse than no setup at all — it gives you data that looks right but is wrong in ways that are hard to detect until you've made bad decisions based on it.
This guide walks through the correct setup from scratch: creating the property, connecting it to Shopify, enabling ecommerce tracking, and verifying that data is actually flowing correctly before you trust anything you see in the dashboard.
Before You Start
You'll need:
- A Google account (use your business email, not a personal Gmail)
- Admin access to your Shopify store
- About 30–45 minutes for setup and verification
If you already have a Google Analytics property from a previous setup, start at Step 3 to verify your ecommerce tracking is enabled correctly. Many stores have Google Analytics connected but ecommerce tracking disabled — meaning you see traffic data but no purchase or revenue data.
Step 1: Create a Google Analytics 4 Property
- Go to analytics.google.com and sign in
- Click Admin (gear icon, bottom left)
- In the Account column, click Create Account if you don't have one, or select your existing account
- In the Property column, click Create Property
- Enter your property name (use your store name, e.g., "Cedar Tubs — Shopify")
- Select your reporting time zone (match it to your business location, not where your servers are)
- Select your currency (match it to what you report revenue in)
- Click Next, fill in business details, click Create
You'll be taken through a setup wizard. When asked about your goals, select "Examine user behavior" and "Generate leads" (for ecommerce, the latter is the closest option). This affects some default reporting configurations.
After creation, you'll see your Measurement ID — it starts with G- followed by letters and numbers (e.g., G-ABC123DEF4). Copy this — you'll need it in the next step.
Step 2: Connect Google Analytics to Shopify
Shopify has a native Google Analytics integration. Use this, not a third-party app, not a manually pasted script in your theme. The native integration handles purchase tracking in Shopify's checkout properly, which third-party solutions often don't.
- In your Shopify admin, go to Online Store → Preferences
- Scroll to Google Analytics
- Click Set up Google (or if you previously used Universal Analytics, click Manage to update it)
- Follow the prompts to sign in with the Google account that owns your Google Analytics property
- Select the property you just created
- Enable Enhanced Ecommerce when prompted — this is what enables product-level revenue tracking, cart events, and checkout funnel data
If you don't see the native integration option (some older Shopify themes or Plus accounts may differ), you can alternatively use Google Tag Manager. In that case:
- Install the Google Tag Manager Shopify app or add GTM container code to your theme
- Set up a Google Analytics Configuration tag in GTM
- Create a purchase event tag triggered on the order confirmation page
The native integration is simpler and more reliable for most stores. Use GTM only if you need customization beyond what the native integration supports.
Step 3: Enable Enhanced Ecommerce Tracking
If you missed this during setup, or want to verify it's enabled:
- In Google Analytics, go to Admin → Data Streams
- Click on your web data stream
- Scroll to Enhanced measurement — make sure it's toggled on
- Click the settings gear next to Enhanced measurement
- Ensure Purchases is enabled
Back in Shopify admin, also verify:
- Go to Online Store → Preferences → Google Analytics
- Confirm "Use Enhanced Ecommerce" is checked
Without this step, Google Analytics will track page views and sessions but won't capture add_to_cart, begin_checkout, purchase, or revenue data.
Step 4: Wait 24–48 Hours, Then Verify With DebugView
Don't skip this step. A setup that looks correct can still be silently broken. DebugView lets you see exactly what events Google Analytics is receiving from your store in real time.
- Open your Shopify store in a browser
- Browse a few products, add one to your cart
- In Google Analytics, go to Configure → DebugView
- You should see events appearing in real time as you browse
Events to verify:
page_view— fires on every page loadview_item— fires when you view a product pageadd_to_cart— fires when you add a productbegin_checkout— fires when you start checkout
For purchase tracking, place a test order using Shopify's Bogus Gateway:
- In Shopify admin, go to Settings → Payments
- Enable Bogus Gateway for testing
- Place a test order using card number
1(success scenario) - Complete the order and land on the confirmation page
- In DebugView, look for the
purchaseevent
When the purchase event appears, verify:
transaction_idhas a real order ID (not null or empty)valuehas the correct order totalcurrencyis correctitemsarray is populated with your product
If any of these are wrong, see our guide on how to fix missing purchases in Google Analytics for specific fixes.
Disable the Bogus Gateway after testing.
Step 5: Connect Google Search Console (Strongly Recommended)
Google Search Console shows you which search queries bring visitors to your store and how your pages rank. Connecting it to Google Analytics puts this data directly into your Google Analytics reports.
- Go to search.google.com/search-console and add your store's domain
- Verify ownership (the easiest method is the HTML tag method — Google will give you a meta tag to add to your Shopify theme's
<head>) - Once verified, go to Google Analytics → Admin → Product Links → Search Console Links
- Click Link and connect your verified Search Console property
After linking, you'll see organic keyword data in Google Analytics under Reports → Acquisition → Search Console.
5 Common Setup Mistakes That Break Your Data
Mistake 1: Using Multiple Tracking Methods Simultaneously
If you have the native Shopify integration active and a separate Google Analytics tag in your theme code and a third-party app all firing at the same time, every event fires multiple times. You'll see inflated session counts and potentially doubled revenue in reports.
Fix: Use exactly one tracking method. Remove all others completely.
Mistake 2: Not Filtering Internal Traffic
Every time you or your team visits your store, those sessions count in Google Analytics. For small stores, internal traffic can represent 20–30% of total sessions, making your data completely unreliable.
Fix: In Google Analytics, go to Admin → Data Streams → Your stream → More tagging settings → Define internal traffic. Add your office IP address(es). Then create a filter to exclude internal traffic in your data settings.
Mistake 3: Wrong Reporting Time Zone
If your Google Analytics time zone doesn't match your business time zone, daily and weekly reports will show data cut off at unexpected times. A store based in London with a US/Pacific timezone set in Google Analytics will have reports that shift by 8 hours.
Fix: Go to Admin → Property Settings → Property time zone and match it to your business location.
Mistake 4: Not Linking Google Ads
If you run Google Ads and haven't linked your account to Google Analytics, you can't see which specific keywords and campaigns are driving conversions in your store. You're flying blind on your paid search spend.
Fix: Admin → Product Links → Google Ads Links → Link your Google Ads account.
Mistake 5: Trusting the Data Before Verification
Many store owners set up Google Analytics, glance at the dashboard a week later, and start making decisions — without ever verifying that purchase events are firing correctly or that internal traffic is filtered.
Fix: Always run the DebugView test purchase before trusting any data. Then compare your first month of Google Analytics purchase counts to Shopify order counts. A gap above 20% means something in your setup needs attention. For expected and acceptable discrepancies, see our guide on why Google Analytics revenue differs from Shopify.
What to Check Monthly After Setup
Once Google Analytics is running correctly, do a monthly data health check:
- Compare purchase counts: Google Analytics purchases vs Shopify orders. The gap should be consistent month to month.
- Check Direct traffic percentage: Should be under 20%. Higher means attribution is leaking.
- Verify ecommerce events in DebugView after any Shopify theme update — theme updates can inadvertently break tracking scripts.
- Review any new "Unassigned" channel grouping appearing in your Traffic Acquisition report — it means a new traffic source isn't being tagged properly.
The Bottom Line
A correctly configured Google Analytics setup takes about an hour to get right. An incorrectly configured one wastes hours of your time analyzing data that doesn't reflect reality.
The native Shopify integration, verified with DebugView, filtered for internal traffic, and linked to Search Console and Google Ads — that's the foundation. Once it's solid, Wardly reads it daily and surfaces the insights that actually matter.
Ready to turn your Google Analytics data into daily actionable insights? Connect Wardly in 5 minutes.
