·6 min read

GA4 e-commerce: Shopify and WooCommerce tracking (guide)

Configure GA4 for a Shopify or WooCommerce e-commerce site: revenue, conversion rate, average basket. Step-by-step freelance guide.

ga4 ecommercegoogle analytics 4 ecommercega4 purchase trackingga4 shopify

By Matheo Zimmer

An e-commerce client without purchase tracking in GA4 is like flying blind. You can see that people visit the site: but you don't know how many buy, what they buy, or where they come from when they convert.

E-commerce tracking in GA4 completely changes what you can analyse: and therefore what added value you can charge for.


What GA4 e-commerce tracking lets you measure

With properly configured e-commerce tracking, GA4 gives you access to:

  • Revenue by channel, by product, by period
  • Conversion rate: percentage of visitors who buy
  • Average order value
  • Top-selling products
  • Purchase funnel: at which step customers drop off
  • Revenue by acquisition channel: which channel brings the most money

These metrics transform your monthly report: instead of "1,200 visitors this month", you can say "1,200 visitors, 38 orders, €65 average basket, that's €2,470 in revenue: up 18% vs the previous month".


The 3 cases by platform

Shopify

Shopify has integrated GA4 natively since 2023. The connection happens in a few clicks and e-commerce tracking is automatically configured.

  1. Shopify admin → Online StorePreferences
  2. "Google Analytics" section → enter your GA4 Measurement ID (G-XXXXXXXXXX)
  3. Enable "Use Enhanced Ecommerce"

Shopify automatically sends the events: view_item, add_to_cart, begin_checkout, purchase.

Verification: in GA4 → Reports → Monetisation → Overview: purchase data must appear within 24-48h.

WooCommerce (WordPress)

WooCommerce requires a plugin to send e-commerce data to GA4.

Recommended plugin: Google Site Kit (official Google) or WooCommerce Google Analytics Integration.

  1. Install the Google Site Kit plugin
  2. Configure it with your Google account → connect GA4
  3. In the plugin settings: enable "WooCommerce tracking"

All e-commerce events are then sent automatically.

GTM alternative: if the site already uses GTM, install the official Google Analytics 4 for WooCommerce extension: it pushes events into the data layer (dataLayer) that GTM reads.

Custom site (React, Next.js, Laravel, etc.)

For custom sites, e-commerce tracking is implemented manually via gtag.js or the GTM dataLayer.

The 4 key events to implement:

// 1. Product view
gtag('event', 'view_item', {
  currency: 'USD',
  value: 29.99,
  items: [{ item_id: 'SKU_001', item_name: 'Product name', price: 29.99 }]
});

// 2. Add to cart
gtag('event', 'add_to_cart', {
  currency: 'USD',
  value: 29.99,
  items: [{ item_id: 'SKU_001', item_name: 'Product name', price: 29.99, quantity: 1 }]
});

// 3. Checkout start
gtag('event', 'begin_checkout', {
  currency: 'USD',
  value: 29.99,
  items: [...]
});

// 4. Purchase confirmed (on the confirmation page)
gtag('event', 'purchase', {
  transaction_id: 'T_001',
  value: 29.99,
  currency: 'USD',
  items: [{ item_id: 'SKU_001', item_name: 'Product name', price: 29.99, quantity: 1 }]
});

The purchase event is the most important: it feeds the revenue reports in GA4.


Verify that tracking works

Real-time test

  1. Make a test purchase on the site (or use GTM preview mode)
  2. In GA4 → Reports → Realtime
  3. In the "Key events" section: the purchase event must appear

Monetisation report

After 24-48h of collection:

  1. GA4 → Reports → Monetisation → Overview
  2. You should see: Total revenue, Number of transactions, Average order value

If revenue appears at 0 but transactions are counted, the value parameter in your purchase event is probably not set correctly.


The reports to follow each month for an e-commerce client

1. Revenue by acquisition channel

Where: Reports → Life cycle → Acquisition → User acquisition What you look at: which channel (SEO, Ads, Social, Email) generates the most revenue, not just the most clicks.

A channel that represents 15% of traffic but 40% of revenue deserves more investment. A channel that represents 40% of traffic and 10% of revenue is possibly over-targeted.

2. Conversion funnel

Where: Explorations → New exploration → Funnel Steps: view_itemadd_to_cartbegin_checkoutpurchase

This report shows exactly where visitors drop off. If 80% of cart adds don't proceed to checkout, there's a problem on the cart page. If 60% drop off at checkout, it's a form or shipping issue.

3. Best-selling products

Where: Reports → Monetisation → E-commerce items What you look at: which products generate the most revenue, which have a high add-to-cart rate but few purchases (price or trust issue).


What to include in the monthly report

For an e-commerce client, the monthly report should cover:

  1. Monthly revenue with variation vs previous month
  2. Number of orders and average basket
  3. Global conversion rate (orders / sessions)
  4. Top channel by revenue: often different from the top channel by traffic
  5. Top-selling product of the month
  6. Recommendation: a concrete action (improve the checkout page, recover cart abandons, etc.)

This level of analysis is what justifies a monthly service at $500-800 rather than a plain "here are your stats".

If you manage several e-commerce clients, NarratIQ centralises their GA4 data in a single dashboard and generates the PDF report in seconds, without having to navigate GA4 for each shop.

Frequently asked questions

Four core events: `view_item` (product view), `add_to_cart` (cart add), `begin_checkout` (checkout start), `purchase` (purchase). With these 4, you build the full e-commerce funnel. Optional based on the site: `view_cart`, `remove_from_cart`, `add_payment_info`, `refund`. All must include the `value`, `currency` and `items[]` parameters.

Ready to automate your GA4 reports?

Connect your Google Analytics 4 in 5 minutes. 14-day free trial, no credit card.

Try NarratIQ free