Analytics and Tracking

Ecommerce Tracking

Also called e-commerce tracking, enhanced ecommerce

The setup that records product views, baskets, checkouts and purchases with order values, so revenue can be tied to channels and campaigns.

Quick facts: Ecommerce Tracking

Category
Analytics and Tracking
Also called
e-commerce tracking, enhanced ecommerce
Level
Intermediate
Affects
Revenue reporting, ROAS, value-based bidding, product and funnel analysis
Where to see it
GA4 DebugView, GA4 Ecommerce purchases report, Tag Assistant, your shop platform's order report
In this article4
  1. How ecommerce tracking works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Ecommerce tracking is the setup that records what shoppers do with your products in your analytics and ad platforms: which items they view, what goes in the basket, when they start checkout and what they finally buy, with order values attached. Without it, an online shop can see visits but cannot tell which channel, campaign or product produced the revenue.

How ecommerce tracking works

In GA4, ecommerce tracking is a family of recommended events with fixed names, each carrying details of the products involved. They follow the shopping journey:

  • view_item_list and select_item when someone browses a category and picks a product;
  • view_item on a product page;
  • add_to_cart, remove_from_cart and view_cart;
  • begin_checkout, add_shipping_info and add_payment_info as they move through checkout;
  • purchase on the order confirmation, and refund when money goes back.

Every one of these events carries an items array: a list of the products involved, each with an ID, name, price and quantity, and optionally brand, category and variant. The purchase event adds order-level fields: a transaction ID, the total value, the currency (GBP for a UK shop), tax, shipping and any coupon used.

The shop platform or a developer places this information in the data layer, and the Google tag, usually managed through Google Tag Manager, sends it on. Shopify, WooCommerce, Magento and BigCommerce all have apps or plugins that do much of the work, with varying care. The same purchase data normally feeds Google Ads conversion tracking and the Meta Pixel as well, so an error in one place tends to spread to all three.

“Enhanced ecommerce” was the name of the equivalent feature in Universal Analytics, which Google retired between 2023 and 2024. A plugin or tutorial that still talks about enhanced ecommerce is probably out of date.

Why it matters

Ecommerce tracking turns marketing spend into a question about money. With purchase revenue recorded by channel, you can compare £1,000 spent on Google Shopping with £1,000 spent on Meta ads by what each brought back, rather than by clicks. Bidding strategies that aim for conversion value, such as Maximise Conversion Value or a target ROAS, depend on accurate order values to decide what to bid. Feed them inflated or missing values and they will chase the wrong products.

The earlier events matter as much as the sale. If many people view a product but few add it to the basket, the product page is the problem. If plenty add it but few complete the order, look first at delivery costs, payment options and the checkout itself. That split tells you where to spend your effort.

Common mistakes

  • Counting the same order twice. If the confirmation page fires purchase every time it loads, a customer who refreshes it or returns from an email link records a second sale. A unique transaction ID lets GA4 ignore the repeat; see duplicate transactions.
  • Inconsistent values. One tag sends the total including VAT and delivery, another sends the net product price. Choose one definition, write it down and use it in every platform.
  • Values sent as text. “£49.99” is a string, not a number. Send 49.99 with the currency set to GBP.
  • Payment pages taking the credit. When customers leave for PayPal, Klarna or a bank’s security check and come back, the return can be recorded as a new visit from the payment provider. Add those domains to GA4’s list of unwanted referrals, the GA4 form of a referral exclusion.
  • Ignoring refunds. Without refund events, a product that is often sent back looks more profitable than it is.
  • Expecting GA4 to match the shop’s back office. Visitors who refuse analytics cookies, ad blockers and browser privacy features all mean GA4 records fewer orders than Shopify or WooCommerce. A steady gap is normal; a gap that suddenly widens is a fault.

How to act on it

  1. Place a test order, using your platform’s test payment mode if it has one, and watch it arrive in GA4’s DebugView with the right items, value, currency and transaction ID.
  2. Reload the confirmation page and confirm no second purchase appears.
  3. Compare a week of GA4 purchases and revenue with the shop’s own order report. Note the gap and review it monthly.
  4. Walk through the funnel on mobile and desktop, including guest checkout and express buttons such as Apple Pay, which often skip the usual checkout steps and their events.
  5. Make sure the ad platforms receive the same value and transaction ID as GA4, so each can discard duplicates.

Reliable ecommerce data is the starting point for any paid campaign I run in performance marketing; I check it before changing a single bid.

Do and do not

Do

  • Send a unique transaction ID with every purchase
  • Use one revenue definition across GA4 and the ad platforms
  • Test with a real order before every launch

Do not

  • Fire the purchase event on every confirmation page load
  • Send prices as text with a pound sign
  • Expect GA4 to match your back office exactly

Questions people ask about this

Is ecommerce tracking switched on automatically in GA4?

No. GA4 records page views and some interactions on its own, but it has no way of knowing what a product, basket or order is on your site. The ecommerce events have to be sent by your shop platform, a plugin or a developer, through the data layer or the Google tag. Check exactly which events your platform's integration sends rather than assuming it covers the whole journey.

Why does GA4 show less revenue than my shop platform?

Three things usually explain it: visitors who decline analytics cookies, browsers and ad blockers that stop the tag, and orders completed where the tags never run, such as phone orders or manual invoices. Differences in currency and time zone settings can shift daily totals too. A stable gap is expected; a sudden change means something has broken.

Should the purchase value include VAT and delivery?

There is no single rule, but use one definition everywhere. Many UK shops report the total the customer paid, including VAT, and send tax and shipping in their own fields so they can be removed in analysis. If you bid to a ROAS target, remember that a VAT-inclusive value makes returns look higher than the money you keep.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.