E-Commerce·14 min read

Conversion Tracking for E-Commerce: From Setup to Optimization

Everything you need to know about setting up reliable conversion tracking for your e-commerce store, from basic purchase events to advanced attribution.

conversion trackinge-commerce analyticspurchase trackingGA4 ecommerceattribution

Published May 15, 2026

Share:
Conversion Tracking for E-Commerce: From Setup to Optimization

Why Conversion Tracking Matters for E-Commerce

Without proper conversion tracking, you genuinely cannot answer the most important questions in your marketing. Which traffic sources actually drive sales? Which products have the best margins? Which ad campaigns are worth scaling? What does it actually cost to acquire a customer?

I've audited accounts where significant ad spend was running against channels that looked active in traffic reports but were contributing almost nothing to revenue. That only becomes visible when your conversion tracking is clean.

Getting this right turns your analytics from a source of vanity metrics into something you can base real budget decisions on.

Core E-Commerce Conversion Events

Every e-commerce site should track these key events in GA4:

  1. add_to_cart — user adds a product to cart
  2. view_cart — user views their shopping cart
  3. begin_checkout — checkout process starts
  4. add_shipping_info — user provides shipping address
  5. add_payment_info — user adds payment method
  6. purchase — successful order placement

The flow maps directly to your customer journey: Browse, Add to Cart, Start Checkout, Add Payment, Purchase. Each step gives you a stage to measure drop-off, which is where the real optimisation insight lives.

Setting Up the Purchase Event (Most Important)

The purchase event is where revenue tracking happens and where Google Ads gets its conversion data. Get this one right first.

What Data the Purchase Event Should Include

gtag('event', 'purchase', {
  transaction_id: "123456789",
  value: 99.99,
  currency: "USD",
  items: [
    {
      item_id: "SKU-1001",
      item_name: "Blue Running Shoes",
      currency: "USD",
      price: 49.99,
      quantity: 1,
      item_category: "Footwear",
      item_brand: "Nike"
    },
    {
      item_id: "SKU-2002",
      item_name: "Sports Socks",
      currency: "USD",
      price: 9.99,
      quantity: 2,
      item_category: "Accessories",
      item_brand: "Nike"
    }
  ]
});

Implementation via Google Tag Manager

  1. Create a data layer variable for order data:

    • Variable name: Order ID mapped to {{Order ID}}
    • Variable name: Order Value mapped to {{Order Value}}
    • Create a Custom JavaScript variable for the items array: {{Items Array}}
  2. Create a trigger for purchase:

    • Trigger type: Custom Event
    • Event name: purchase
  3. Create the GA4 Event tag:

    • Tag type: GA4 Event
    • Measurement ID: your GA4 ID
    • Event name: purchase
    • Event parameters: transaction_id, value, currency, items
  4. Publish and test using Tag Assistant

The items array is the part people most often get wrong. It needs to come from your data layer, not be hardcoded, and it needs to match the actual cart contents at the moment of purchase.

GTM showing the GA4 purchase event tag with transaction_id and value parameters correctly mapped
GTM showing the GA4 purchase event tag with transaction_id and value parameters correctly mapped

Tracking the Full Funnel

Beyond purchase, track the entire checkout flow to identify drop-off points.

Add to Cart Event

gtag('event', 'add_to_cart', {
  value: 49.99,
  currency: "USD",
  items: [
    {
      item_id: "SKU-1001",
      item_name: "Blue Running Shoes",
      price: 49.99,
      quantity: 1,
      item_category: "Footwear"
    }
  ]
});

Fire this when a user clicks "Add to Cart".

Begin Checkout Event

gtag('event', 'begin_checkout', {
  value: 99.99,
  currency: "USD",
  items: [
    // All items currently in the cart
  ]
});

Fire when the checkout form appears.

View Item Event

Track product page views to understand browsing behaviour:

gtag('event', 'view_item', {
  items: [
    {
      item_id: "SKU-1001",
      item_name: "Blue Running Shoes",
      price: 49.99,
      item_category: "Footwear",
      item_brand: "Nike"
    }
  ]
});

Setting Up Conversion Goals in GA4

Once events are firing, mark the important ones as conversions:

  1. Go to Admin > Events in GA4
  2. Find the purchase event
  3. Click the checkbox: Mark as conversion
  4. Repeat for begin_checkout and other key milestones

These events will now appear in conversion reports and can be analysed across your traffic acquisition data.

Revenue Reporting

GA4 calculates revenue automatically when you include the value parameter in events.

View Revenue Reports

  1. Go to Reports > Monetization in GA4
  2. You'll see total revenue by date, by traffic source, and by user
  3. Go to Reports > User Acquisition and select "Revenue" as your metric

This is where you discover which channels are genuinely profitable. Traffic volume and revenue contribution often tell very different stories.

Implementing Pixel-Based Tracking

GA4 handles your analytics, but paid ad platforms need their own conversion signals to optimise campaigns properly.

Meta Pixel Setup

  1. Create a Meta pixel in Business Manager
  2. Get your pixel ID
  3. Install via GTM — create a Custom HTML tag with your Meta pixel base code and set up triggers for each conversion event

Google Ads Conversion Tracking

The modern approach here is to import from GA4 rather than running a separate Google Ads tag:

  1. Link your GA4 property to Google Ads
  2. In Google Ads, go to Tools > Conversions
  3. Select Import > Google Analytics 4
  4. Choose the conversions you want to track

Google Ads then receives conversion data directly from GA4. No separate tags needed.

Debugging Common Issues

Purchase Event Not Firing

  1. Open the Tag Assistant Chrome extension
  2. Complete a test purchase
  3. Look for the purchase event in the Tag Assistant log
  4. Verify the data layer push is happening at the right moment — sometimes the event fires too early, before the transaction is confirmed on the backend
Tag Assistant showing the purchase event firing with transaction_id, value, and items visible in the event payload
Tag Assistant showing the purchase event firing with transaction_id, value, and items visible in the event payload

Revenue Not Showing in Reports

  1. Verify the value parameter is included in the purchase event
  2. Verify currency is a valid currency code
  3. Wait 24 hours — GA4 needs time to process data
  4. Check Admin > Data Collection to confirm your data stream is receiving the events

Discrepancies Between GA4 and Your Platform

Some discrepancy is normal and expected. Common causes:

  • Bounce backs: GA4 counts the initial data layer call, while your platform may only count transactions that clear payment processing
  • Timing: GA4 processes in real-time, but your platform may batch-process overnight
  • Filters excluding certain traffic

A 5-10% gap is typical. Anything more than that is worth investigating.

Advanced: Revenue Attribution Models

GA4 supports different attribution models to understand which touchpoints contribute to revenue:

  1. Go to Admin > Data settings > Attribution settings
  2. Choose your attribution model:
    • Last click (default): all credit to the final conversion touch
    • First click: all credit to the first touch
    • Linear: equal credit to all touches
    • Time decay: increasing credit to more recent touches
    • Position-based: 40% to first touch, 20% to middle, 40% to last

Running reports with different models often reveals interesting gaps between what gets credit under last-click and what actually started the journey.

Checklist: Before Going Live

  • All events include required parameters (value, currency, items)
  • Events fire at the correct moments in the user journey
  • Purchase event data matches actual order values
  • Events are tested with Tag Assistant
  • Conversions are marked in GA4
  • Revenue reports show data
  • Ad platforms are receiving conversion signals
  • Team has access to analytics reports
  • Alerts are set up for anomalies

Ongoing Monitoring

Check conversion rates and revenue trends weekly for anomalies. A sudden drop in tracked revenue while actual sales continue is a sign something broke.

Monthly: review which products, categories, and traffic sources are driving the most revenue.

Quarterly: audit event data accuracy against actual transaction records from your platform.

Conversion tracking drifts as sites change. New checkout flows, new payment providers, and new marketing tools all have the potential to break something. Catching issues early, before they've corrupted weeks of data, saves a lot of pain later.

Found this useful?
Share this article:XLinkedInFacebook

Sharing takes 2 seconds and helps others find this article.

Free Resource

Free GA4 & Consent Mode v2 Audit Checklist

A practical, field-tested checklist to verify your GA4 setup, GTM hygiene, Consent Mode v2 wiring, conversion tracking, and QA — download the PDF in seconds.

Get the free checklist →

Ready to implement these insights?

Let's talk about how to apply this to your specific situation. I work with businesses across industries on analytics, tracking, and growth.

Get in touch