Article

Mar 23, 2026

How to Set Up GA4 Ecommerce Tracking: A Complete Guide for Online Stores

Set up GA4 ecommerce tracking correctly for your Shopify store — covering key events, purchase funnels, Google Ads linking, and what to do when numbers don't match.

How to Set Up GA4 Ecommerce Tracking: A Complete Guide

GA4 ecommerce tracking gives you the data to understand what's working in your store and what isn't. Without it, you're making marketing decisions based on ad platform self-reporting — which consistently overstates performance — and gut feel.

Set up correctly, GA4 tells you which channels are actually driving revenue, which products convert best, where customers are dropping out of the purchase funnel, and whether your ROAS numbers from Google Ads and Meta are real. That's the data your business needs to grow intelligently.

This guide covers the complete GA4 ecommerce setup for Shopify stores, the events that matter most, and how to use the data once it's flowing.

What Is GA4 Ecommerce Tracking?

GA4 (Google Analytics 4) replaced Universal Analytics in 2023. It uses an event-based data model — rather than page-view-based sessions — which makes it better suited to tracking user behaviour across the purchase funnel.

Ecommerce tracking in GA4 refers to a specific set of events that capture product interactions and purchase behaviour:

  • view_item_list — a user views a collection/category page

  • view_item — a user views a specific product page

  • add_to_cart — a user adds a product to their cart

  • begin_checkout — a user starts the checkout process

  • add_payment_info — a user enters payment details

  • purchase — a transaction is completed

Together, these events create your purchase funnel — a clear picture of where users are entering, progressing, and dropping off on their path to buying.

Before You Start: Two Common Mistakes

Mistake 1: Mixing up events and conversions. In GA4, all events are just events by default. To see revenue data and conversion tracking, you need to mark the purchase event as a conversion in GA4's configuration. Without this step, your purchase data won't appear in your conversions report.

Mistake 2: Double-counting purchases. If both your Shopify native GA4 integration and Google Tag Manager are firing the purchase event, you'll see inflated revenue numbers. Decide on one method before setting up — not both.

Method 1: GA4 Setup via Shopify's Native Integration (Simplest)

If you're on Shopify and just need standard ecommerce tracking without custom events or advanced configuration, the native integration is the fastest path.

Step 1: Create a GA4 Property

Go to analytics.google.com and sign in with your Google account.

  1. Click the Admin gear icon (bottom left)

  2. Under "Account," click "Create account" if you don't have one, or select an existing account

  3. Under "Property," click "Create property"

  4. Name the property (your store name), select your time zone (New Zealand) and currency (NZD)

  5. Complete the business details prompts

  6. Select "Web" when prompted for a platform

GA4 will generate a Measurement ID in the format G-XXXXXXXXXX. Save this — you'll need it.

Step 2: Connect GA4 to Shopify

In your Shopify admin:

  1. Go to Online Store → Preferences

  2. Find the "Google Analytics" section

  3. Enter your GA4 Measurement ID (G-XXXXXXXXXX)

  4. Enable "Use Enhanced Ecommerce"

  5. Save

Shopify will begin sending basic ecommerce events to GA4. This typically includes view_item, add_to_cart, begin_checkout, and purchase events.

Step 3: Test the Integration

Before relying on the data, verify it's working:

  1. In GA4, go to Reports → Realtime

  2. Open your store in a browser tab

  3. Browse a product page, add something to cart, and complete a test purchase (if comfortable, or use a discount code to make the purchase $0)

  4. In the Realtime report, you should see events firing: view_item, add_to_cart, begin_checkout, purchase

If events aren't appearing, check the Measurement ID is entered correctly in Shopify, and ensure there are no browser extensions (like ad blockers) that might be blocking the GA4 tag.

Method 2: GA4 Setup via Google Tag Manager (Recommended for Most Stores)

GTM gives you significantly more control — you can add custom events, track specific button clicks, test tags before publishing, and manage all your tracking from one interface without touching code.

Step 1: Create a GTM Container

Go to tagmanager.google.com and create a new account and container for your website. Copy the two GTM snippets (one for <head>, one for <body>).

Step 2: Add GTM to Shopify

In Shopify, go to Online Store → Themes → Actions → Edit code → Open theme.liquid.

Paste the <head> snippet immediately after the opening <head> tag. Paste the <body> snippet immediately after the opening <body> tag.

Save the file.

Step 3: Add GA4 in GTM

In GTM:

  1. Go to Tags → New → Tag type: Google Analytics: GA4 Configuration

  2. Enter your Measurement ID (G-XXXXXXXXXX)

  3. Set the trigger to "All Pages"

  4. Name the tag "GA4 - Configuration" and save

Step 4: Push Ecommerce Data Layer Events

GTM reads from the Shopify dataLayer to capture ecommerce events. Shopify natively pushes some dataLayer events — the exact events available depend on your Shopify plan and theme.

For full ecommerce event coverage on Shopify via GTM, the most reliable approach is to install the "Elevar" Shopify app or use a purpose-built GA4 + GTM implementation guide. These handle the dataLayer configuration for you.

Alternatively, you can manually configure GTM triggers and tags for each ecommerce event — but this requires more technical knowledge and testing.

Step 5: Publish Your GTM Container

Once your tags are configured and tested (use GTM Preview mode to verify events are firing correctly before publishing), click "Submit" in GTM to publish your container.

Marking Purchase as a Conversion

In GA4, all events need to be explicitly marked as conversions to appear in your conversion tracking.

  1. In GA4, go to Admin → Events

  2. Find the purchase event

  3. Toggle "Mark as conversion" to ON

You should also consider marking begin_checkout as a conversion — it's useful for understanding checkout initiation rate and building remarketing audiences.

Configuring Key GA4 Reports for Ecommerce

Once tracking is flowing, these are the reports that matter most for an ecommerce store:

Monetisation Overview

Go to Reports → Monetisation → Overview

This gives you your top-level ecommerce metrics: total revenue, transactions, average order value, and ecommerce conversion rate. It's your daily dashboard.

Check this report against your Shopify revenue to confirm the numbers are aligning. GA4 may slightly under-report (due to ad blockers and JS loading issues) but should be within 5–10% of your actual Shopify revenue.

Purchase Journey (Funnel)

Go to Reports → Monetisation → Purchase journey

This is the funnel visualisation: how many users progress from session start → product view → add to cart → checkout → purchase. The drop-off at each stage tells you where to focus CRO efforts.

If there's a large drop between "view item" and "add to cart," your product pages need attention. If the drop is between "checkout" and "purchase," there's friction in the checkout process.

Ecommerce Purchases

Go to Reports → Monetisation → Ecommerce purchases

This shows revenue and transaction data by product. Which products are selling most? Which have the highest add-to-cart rate but low purchase rate (suggesting a problem with the product page)? This is where product-level insights live.

Traffic Acquisition

Go to Reports → Acquisition → Traffic acquisition

This shows sessions by channel and their associated conversion metrics. You can see conversion rate, revenue, and transactions broken down by organic search, paid search, paid social, email, direct, and referral.

This is your cross-channel performance overview — the report that tells you whether your spend allocation matches where revenue is actually coming from.

Advertising Reports (with Google Ads linked)

If your Google Ads account is linked to GA4, the Advertising reports give you cross-channel attribution data:

  • Attribution → Model comparison: Compare last-click vs data-driven vs first-click to see how credit shifts across channels

  • Attribution → Conversion paths: See the actual sequences of touchpoints that led to purchases

Connecting GA4 to Google Ads

Linking GA4 to Google Ads enables imported conversions (using GA4's purchase data in Smart Bidding rather than the Google Ads tag alone) and audience building.

In GA4:

  1. Go to Admin → Product Links → Google Ads Links

  2. Click "Link" and select your Google Ads account

  3. Enable "Personalised advertising" if you want to use GA4 audiences in Google Ads

  4. Enable "Conversion measurement" and import the purchase conversion action into Google Ads

Once linked, import the GA4 purchase conversion into Google Ads rather than using a separate Google Ads conversion tag. This gives your bidding algorithms access to more complete conversion data and avoids double-counting.

Common GA4 Ecommerce Setup Issues

Revenue shows as $0 in GA4. The purchase event is firing but not passing revenue data. Check that your ecommerce integration is passing the value and currency parameters with the purchase event. In GTM, use Preview mode to inspect the event and confirm these fields are present.

Transactions are much lower than Shopify. Some customers use ad blockers or strict browser privacy settings that block GA4. A 5–10% discrepancy is normal. More than 15% suggests a tracking issue — check for GTM or dataLayer errors.

Duplicate transactions. Both the Shopify native integration and GTM are firing the purchase event. Pick one method and disable the other.

Purchase event fires on page refresh. The confirmation page is being revisited and re-triggering the purchase event. Fix: configure the purchase tag to fire only once per transaction ID. In GTM, you can add a trigger exception checking that the transaction ID hasn't already been captured.

Ecommerce Analytics Without Accurate Tracking Is Just Guesswork

The analytics setup is not glamorous work — it's infrastructure. But it's the infrastructure that every marketing decision you make will rest on for the life of your store.

Getting it right matters. A broken purchase event, a missing channel attribution, or an unlinked Google Ads account doesn't just produce wrong numbers — it produces confidently wrong numbers that lead to bad decisions made with apparent certainty.

Take the time to test it properly before you rely on it.

If you'd like your GA4 ecommerce tracking professionally audited and configured — including purchase funnel validation, Google Ads linking, and custom audience setup — our analytics service covers the full implementation from scratch.

© All rights reserved

© All rights reserved