If you run an online store, data is your edge. E-commerce tracking reveals: What products are being viewed, added to cart, and purchased Where users drop off in the funnel Which campaigns bring actual sales Without proper tracking, you can’t measure ROI, optimize performance, or scale profitably. This guide outlines…

If you run an online store, data is your edge. E-commerce tracking reveals:

Without proper tracking, you can’t measure ROI, optimize performance, or scale profitably. This guide outlines a professional, clean setup using Google Tag Manager (GTM), Google Analytics 4 (GA4), and Google Ads.

E-commerce tracking set up in four steps: define the events, set up the tags, test in GA4, then import into Google Ads

Part 1: Define Your Measurement Strategy

Before touching code or platforms, map out your store’s funnel:

  • Product view (view_item)
  • Add to cart (add_to_cart)
  • Begin checkout (begin_checkout)
  • Add payment info (add_payment_info)
  • Purchase (purchase)

Optional but recommended:

  • sign_up (if account creation)
  • login (returning users)
  • view_promotion (for banners)

Each step should be tracked as an event with structured parameters like product ID, value, and currency.

Part 2: GA4 E-Commerce Events — Structure & Requirements

GA4 supports enhanced e-commerce events out of the box. Key events:

  • view_item: product page loaded
  • add_to_cart: product added to cart
  • begin_checkout: checkout started
  • purchase: transaction completed

Each event requires:

  • items: array of products with item_id, item_name, quantity, price
  • value: total transaction value (for purchase)
  • currency: ISO code (e.g., “USD”)

Part 3: Set Up in Google Tag Manager

Step 1: Enable GA4 in GTM

  • Add a Google tag and enter your GA4 Measurement ID. If a guide still tells you to create a “GA4 Configuration” tag, it was written before 2024: Tag Manager retired that tag type and the Google tag took its place.
  • Trigger: All Pages

Step 2: Configure GA4 Event Tags

For each event (view_item, add_to_cart, etc.):

  • Tag Type: GA4 Event
  • Event Name: e.g., add_to_cart
  • Parameters: pull from variables or custom data layer
  • Trigger: Based on page interaction or custom dataLayer.push

Step 3: Push Data to Data Layer

Developer team must push structured data. Example:

window.dataLayer.push({
  event: "add_to_cart",
  ecommerce: {
    currency: "USD",
    value: 49.99,
    items: [
      {
        item_id: "SKU12345",
        item_name: "Blue Hoodie",
        price: 49.99,
        quantity: 1
      }
    ]
  }
});

Step 4: Test With Debug Tools

  • GTM Preview Mode
  • GA4 DebugView
A 3MY crew member holding a floating data-layer snippet: the currency, the value and the item fields every purchase event has to carry

Part 4: Google Ads Conversion Tracking

Step 1: Import Conversions from GA4

  • In Google Ads: Goals > Conversions > Summary > + New conversion action
  • Choose Import > Google Analytics (GA4) > Web, then pick your purchase event

One prerequisite trips almost everyone up the first time: an event only appears in that import list if it has been marked as a key event in GA4 first. Analytics stopped saying “conversion” in 2024 — in GA4 these are key events, and “conversion” is now the Google Ads word for the same action. Allow up to 24 hours before the imported data starts showing in Google Ads.

Step 2: Use Google Ads Conversion Tag (Optional)

  • If not importing from GA4, place Google Ads tag with ID and label in GTM
  • Trigger on thank-you page only

Step 3: Use Value-Based Bidding

  • Enable “Target ROAS” or “Maximize Conversion Value”
  • Ensure purchase event includes value field

Part 5: Shopify / WooCommerce / Custom CMS Tips

Shopify:

  • Start with the native GA4 integration; add a third-party app such as Elevar only if the events you need are missing
  • Push product data to data layer

WooCommerce:

  • Use GTM4WP or PixelYourSite plugin
  • Enable e-commerce in GA4 settings

Custom Sites:

  • Manual data layer pushes by developers
  • Must follow GA4 schema strictly

Part 6: QA and Maintenance Checklist

  • Test each event for multiple product types
  • Validate parameters via DebugView
  • Monitor for duplicates or missing conversions
  • Ensure privacy/consent settings align with regulations (GDPR, CCPA)

Part 7: Common Errors and Debugging Tips

Problem Why It Happens How to Fix
No data in GA4 for purchase Broken or missing trigger Use GTM Preview & DebugView to test
Value shows as 0 value not passed or wrong format Use numeric format (49.99 not “49.99“)
Missing items in items[] Malformed object Ensure structure matches GA4 docs
Duplicate purchase Tag fires on every pageview Use order ID to limit firing
Missing currency Field omitted Hardcode or use CMS variable
GA4 & Ads mismatch Tags not synced or wrong model Use GA4 import and proper attribution rules
Events don’t fire at all Consent not granted / container not loaded Check Consent Mode and Tag Assistant

Visual QA Checklist Before Launch

  • GTM Preview shows tags firing
  • GA4 DebugView logs all events
  • Purchase triggers only once
  • Value, currency, and item arrays are valid
  • Consent banner tested
  • Attribution data matches across GA4 and Ads

Work With 3MY: Full Funnel Tracking That Scales

We help e-commerce brands implement precise, scalable tracking systems that:

Want to stop guessing and start optimizing?

Book a Free E-Commerce Tracking Audit

Related posts

Crew member dressed as a tooth fairy dentist, in a white coat with glass wings and a head mirror, holds a wand topped with a glowing tooth and a stack of gold coins on the steps of a glass dental clinic by a glacier

Google Ads for Dentists: Implants, Emergencies and the Rules on Your Ads

Reading Time: 20:57 min

Google Ads for dentists: emergencies, implants and checkups need separate campaigns, wrong calls from bargain hunters and insurance seekers cost real money, and Google’s health rules and your regulator decide…

View post
Woman in a yellow 3MY jumpsuit posing as Lady Justice with the blindfold lifted, holding scales that balance ad spend coins against signed legal documents in front of a modern courthouse

Google Ads for Law Firms: Budget, Practice Areas, Ads That Bring Cases

Reading Time: 15:1 min

Google Ads for law firms in Canada and the US: what a signed case costs in ads, which practice to start with, keywords and negatives, sample ads checked against bar…

View post
Crew member sends one beam of light through a prism that splits it into three colours, each lighting a different autumn valley

Google Ads for Small Business: The Lead Goes to Whoever Answers First

Reading Time: 11:31 min

Google Ads brings a small business calls and forms, and the job goes to whoever answers first. How leads arrive, why an unanswered phone wastes the budget, and what to…

View post

Get in touch, and we'll reveal possibilities you never knew existed for your website

Want to know more?

Contact us and we’ll tell you everything you need to know!

Google reCaptcha: Invalid site key.

Or let's talk now
Your 3my agent
Your 3my agent
Your 3my agent Chatting with 3my
Before we start
Please tell us a little about yourself.
Hello! How can I help you today?
✓ The specialist receives your question and your whole previous conversation with our assistant. They will know what it is about — no need to start over, just continue right here from where you left off.
Write your message below.
Powered by BrainChat