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
- 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.
- Reload the confirmation page and confirm no second purchase appears.
- Compare a week of GA4 purchases and revenue with the shop’s own order report. Note the gap and review it monthly.
- 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.
- 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.
