Digital Growth & SEO

E-Commerce Measurement With Google Analytics 4

Share
E-Commerce Measurement With Google Analytics 4

Which four events are essential, how to fill the parameters, why transaction_id must be the order number, and how to reconcile the setup with your store admin.

Without e-commerce tracking in place in GA4, there is no meaningful conversation about conversion rate. This article covers which events to send and in what order, the required parameters, the transaction_id logic that prevents duplicate orders, and how to validate the setup.

Most stores have GA4 installed but their e-commerce events are incomplete. The result: you know your visitor count but not where revenue is lost. Correct tracking turns "let's improve conversion" into an actionable finding like "we lose 40% between basket and checkout".

The events and their order

EventWhen it firesPriority
view_item_listA category or list page is viewedMedium
view_itemA product detail page opensEssential
add_to_cartAn item is added to the basketEssential
remove_from_cartAn item is removedLow
begin_checkoutThe checkout step startsEssential
add_payment_infoPayment details are enteredMedium
purchaseThe order completesEssential

If setup time is limited the priority is clear: view_item, add_to_cart, begin_checkout and purchase. Those four are enough to build the purchase journey funnel. The rest enrich it but you can decide without them.

Parameters: don't send empty events

Sending the event is not enough; the product data inside has to be filled correctly. Every e-commerce event carries an items array:

  • item_id — the product's unique code (SKU). The key to matching across channels.
  • item_name — product name.
  • price — unit price.
  • quantity — units.
  • item_category, item_brand, item_variant — for segmented analysis.

At event level you need currency and value. Without currency, GA4 cannot calculate revenue reports correctly — the most commonly omitted field.

What value should include

Decide and stay consistent: does value include shipping and tax? The general approach is to send the product amount and pass shipping and tax as separate parameters (shipping, tax). Whichever you choose, manage the gap between your accounting report and GA4 knowingly; otherwise you will have a "the numbers don't match" argument every month.

transaction_id: the field that prevents duplicate orders

transaction_id must carry a unique value per order. GA4 will not count a second purchase event arriving with the same transaction_id; with a different ID it records two separate orders.

In practice: if the customer refreshes the thank-you page or reopens the tab, the order is not double-counted as long as the correct transaction_id is sent. But if a random value is generated instead of the order number, every refresh is recorded as a new sale and your revenue report reads above reality.

The correct source is always the order number — not a timestamp, session ID or randomly generated value.

The Google Tag Manager setup flow

  1. Push the event into the dataLayer. On the site or theme side, at the right moment with the right data. This step is developer work and the genuinely hard part.
  2. Create a custom event trigger in GTM. The event name must match the dataLayer exactly — a trigger listening for add_to_cart will not catch a site sending addToCart.
  3. Attach the GA4 event tag. Pass product data through as dataLayer variables.
  4. Repeat for every event. view_item, add_to_cart, begin_checkout and purchase are each set up separately.

Validation: never assume it works

  • DebugView. Place a test order and watch the events arrive in order with their parameters.
  • Realtime report. Confirm events actually reach GA4.
  • Reconciliation. Compare a week of GA4 order count and revenue against the real figures in your store admin. A gap above 5% means the setup has a problem.

Reconciliation is the most skipped and most useful step. The gap usually comes from one of three causes: duplicate purchase events, missing currency, or sessions not measured because of consent management.

Reading the purchase journey report

  1. Which step loses the most? The step with the largest drop is your first intervention point.
  2. Is there a device split? Break the report into mobile and desktop; in most stores the mobile funnel performs markedly worse. We cover closing that gap in our conversion rate article.

Common mistakes

  1. Using something other than the order number as transaction_id. The revenue report inflates.
  2. Not sending currency. Revenue reports are miscalculated.
  3. Misspelling event names. addToCart and add_to_cart are different events to GA4; without the standard names the built-in reports do not work.
  4. Never processing refunds. Returned orders stay in revenue.
  5. Going live without validating. Wrong data is more dangerous than no data — because decisions get made on it.

Conclusion

GA4 e-commerce tracking comes down to sending four events with the right parameters. The hard part is not the setup but the discipline of validation and reconciliation. Once a week of GA4 data matches your store admin, you are ready to start conversion work.

For how to use the measurement, see increasing conversion rate and reducing cart abandonment.

At Commerslab we implement GA4 and GTM setups including product data and reconciliation checks. See our e-commerce consulting service or request a tracking audit.

More

Related posts