PPC AKASH

E-commerce

GA4 E-commerce Tracking: The Events You Need and How to Set Them Up

GA4 E-commerce Tracking: The Events You Need and How to Set Them Up
Quick Answer

A clear walkthrough of the GA4 e-commerce events, the dataLayer structure behind them and the mistakes that break your revenue reports.

Table of Contents
  1. The core e-commerce events
  2. The data each event needs
  3. How to set it up with GTM
  4. Mistakes that break revenue reports
  5. Check your data regularly
  6. Need a hand with this?

GA4 can show you exactly where shoppers drop off, which products sell and how much revenue each channel brings in. But only if your e-commerce events are set up correctly. Here is what a complete setup looks like.

The core e-commerce events

  • view_item_list: a shopper sees a list of products, like a category page.
  • select_item: they click a product in a list.
  • view_item: they view a product page.
  • add_to_cart and remove_from_cart
  • view_cart
  • begin_checkout
  • add_shipping_info and add_payment_info
  • purchase: the most important one.

The data each event needs

Every event should include an items array with product details such as item_id, item_name, price, quantity and item_category. The purchase event also needs:

  • transaction_id: a unique order ID, so GA4 does not count the same order twice.
  • value: the order total.
  • currency: for example USD or GBP.
  • Optional: tax, shipping and coupon.

How to set it up with GTM

  1. Have your store push each e-commerce event to the dataLayer. Many platforms and plugins can do this.
  2. In GTM, create a Custom Event trigger for each event name.
  3. Create a GA4 Event tag that sends the event with e-commerce data enabled.
  4. Test in GTM Preview mode and in GA4 DebugView.

Mistakes that break revenue reports

  • Purchase fires on page reload. If the thank-you page is refreshed, the purchase fires again. A unique transaction ID prevents duplicates.
  • Missing currency. Without a currency, GA4 may not record revenue.
  • Old dataLayer not cleared. Push ecommerce: null before each new e-commerce event so old item data is not reused.
  • Prices as text. Values should be numbers, not strings with currency symbols.
  • Payment gateway redirects. Off-site payments can break the session and assign sales to the wrong source. Add the payment domain to the referral exclusion list.

Check your data regularly

Compare GA4 revenue with your store’s real orders every month. A small gap is normal. A large gap means something is broken.

Need a hand with this?

If you are not sure your setup is sending the right data, request a free tracking audit. I will review your tags, events and conversion actions and send you a clear list of what to fix.

Let's work together

Something isn't tracking? Let's find out why.

Tell me what you are tracking and what looks wrong. I will review your setup and send clear recommendations.

Get a Free Tracking Audit
Akash
Written by

Akash

PPC and conversion tracking specialist. I set up Google Ads, GTM, GA4, Meta CAPI and server-side tracking for businesses worldwide.

Scroll to Top