Glossary Term

Ecommerce Tracking

glossary ecommerce tracking featured

Ecommerce tracking is the practice of recording shopping actions on an online store and sending them to an analytics platform with product and revenue data attached. It captures the full path from product view to add to cart to completed purchase, along with item names, prices, quantities, and order totals. The result is revenue reporting tied to the channel, campaign, and product that produced each sale.

Why Ecommerce Tracking Matters

Ecommerce tracking turns traffic reports into revenue reports. Session counts tell you how many people arrived. Ecommerce data tells you which of them bought, what they bought, and what the order was worth.

It exposes where the funnel leaks. If 1,000 people view a product, 180 add it to cart, and 40 complete checkout, the drop between cart and checkout is the problem worth fixing. Without event-level tracking, that gap is invisible.

It also makes channel spend accountable. Revenue attributed by source lets you compare return on ad spend across paid search, paid social, email, and affiliates instead of comparing click volume. Store owners running promotions across multiple channels can track e-commerce campaigns down to the individual link and see which one produced the order.

Finally, it feeds ad platforms. Google Ads Smart Bidding and Meta Advantage+ optimize toward purchase value. Accurate revenue signals produce better bidding; missing ones produce guesswork.

Ecommerce Events in GA4

GA4 ecommerce tracking is built on a set of recommended events that map to stages of the shopping journey. Google requires these exact event names for data to appear in the Monetization reports.

Stage Event Fires when
Browse view_item_list A category or collection page loads
Browse select_item A shopper clicks a product in a list
Product view_item A product detail page loads
Cart add_to_cart An item is added to the cart
Cart view_cart The cart page or drawer opens
Cart remove_from_cart An item is removed
Checkout begin_checkout Checkout starts
Checkout add_shipping_info Shipping details are submitted
Checkout add_payment_info Payment details are submitted
Order purchase The order confirmation loads
Order refund A full or partial refund is issued

Promotion events (view_promotion, select_promotion) and add_to_wishlist are optional additions. Each event carries an items array, which is what makes product-level reporting possible.

How GA4 Ecommerce Tracking Works

Every ecommerce event sends an items array alongside event-level values. The purchase event is the one that generates revenue, and it requires transaction_id, value, currency, and items to be processed correctly.

gtag('event', 'purchase', {
 transaction_id: 'T_12345',
 value: 129.90,
 currency: 'USD',
 tax: 9.90,
 shipping: 5.00,
 items: [{
 item_id: 'SKU_1001',
 item_name: 'Merino Wool Socks',
 item_brand: 'Northline',
 item_category: 'Apparel',
 item_variant: 'Charcoal / M',
 price: 24.95,
 quantity: 2
 }]
});

Two rules decide whether the data lands. Omit currency and GA4 discards the revenue value. Reuse a transaction_id and GA4 deduplicates the order, which is what prevents a page refresh on the thank you page from double counting a sale. Google caps each event at 200 items, so large orders need to be trimmed before sending.

Sites using Google Tag Manager push the same structure to the dataLayer, and a GA4 Event tag reads it. Server-side setups send the purchase through the Measurement Protocol or a server container instead, which survives ad blockers and browser cookie limits.

How to Set Up Ecommerce Tracking

  1. Install GA4 on every page of the store, including cart and checkout. Use Google Tag Manager if you plan to add pixels later.
  2. Add the dataLayer push or gtag call for each ecommerce event. Shopify handles this through the Google & YouTube app; WooCommerce and Magento use plugins; custom builds need developer work.
  3. Confirm the items array uses consistent item_id values that match your product catalog and feed.
  4. Configure cross-domain measurement if checkout sits on a different domain, otherwise the referring source is lost at the payment step.
  5. Tag every campaign link so revenue attributes to the right channel. The free UTM builder keeps source, medium, and campaign values consistent across email, paid social, and affiliate links.
  6. Test with a real order using DebugView and Tag Assistant, then reconcile the first week of GA4 revenue against your store backend.

Common Ecommerce Tracking Issues

  • Duplicate purchases. The confirmation page fires purchase on every refresh. Send a stable transaction_id and GA4 removes the duplicate.
  • Revenue that does not match the store. GA4 almost always reports less than the backend. Consent denial, ad blockers, expired sessions, and refunds recorded outside GA4 account for most of the gap. Treat the store platform as the revenue source of truth and GA4 as the attribution layer.
  • Checkout on a second domain. A payment gateway or subdomain checkout without cross-domain setup creates self-referrals and moves the sale to referral traffic.
  • Missing currency or value. The event fires, the order appears, and revenue reads zero.
  • Untagged campaign traffic. Email and social links without UTM parameters collapse into direct traffic, so paid revenue looks unattributed.

Frequently Asked Questions

What is ecommerce tracking?

Ecommerce tracking is the recording of shopping actions and transaction data on an online store, then sending that data to an analytics platform. It covers product views, cart additions, checkout steps, purchases, and refunds, each carrying item and revenue details. The data connects each sale back to the channel and campaign that drove it.

How do you set up GA4 ecommerce tracking?

Install GA4 across the store, then send Google’s recommended ecommerce events with an items array on each one. Shopify, WooCommerce, and BigCommerce offer native integrations or plugins that handle this; custom stores implement it through Google Tag Manager or gtag. Validate with DebugView and a live test order before trusting the reports.

Why does GA4 revenue not match Shopify?

GA4 typically reports fewer transactions than the store backend because cookie consent refusals, ad blockers, and offline or manually created orders are never sent to GA4. A gap in the single digit percentages is normal. A gap above 20 percent usually points to a broken tag, a cross-domain checkout, or a missing purchase event.

What replaced enhanced ecommerce?

GA4 ecommerce replaced Universal Analytics Enhanced Ecommerce. Universal Analytics stopped processing data on 1 July 2023, and the event names, data structure, and reports all changed. Enhanced Ecommerce used product impressions and checkout steps, while GA4 uses named events such as view_item, add_to_cart, and purchase.

What metrics should ecommerce tracking report?

Track transactions, revenue, conversion rate, average order value, and revenue by channel as the core set. Add cart abandonment rate, item-level revenue, and return on ad spend for campaign decisions. All of them depend on complete event tracking firing across the funnel in GA4.

To attribute store revenue to the campaigns that earned it, tag every promotional link with the free UTM builder at linkutm before your next launch.