GA4 e-commerce events: correct setup in 2025

GA4 el. prekybos įvykiai: teisingas sukonfigūravimas 2025 m.

In 2025, e-commerce is won not by those who spend the most on ads, but by those whose measurement works without errors. GA4 e-commerce events are your command center: you see which channels actually generate revenue, where the purchase journey breaks, and which changes truly increase sales. Below is a business-style explanation, followed by the deepest technical part with examples so you can implement it correctly and without errors.


Why GA4 e-commerce events matter for your business

If you don’t measure add_to_cart, begin_checkout, and purchase with consistent IDs and values, you’re making decisions based on “gut feeling”. With properly implemented GA4 e-commerce events:

  • you clearly see the purchase journey and cart abandonment points;
  • you accurately compare channels by revenue, not just by clicks;
  • you avoid costly mistakes – ad spend won’t be poured into sources that don’t generate real return.

Want to measure sales better starting today? For internal work, begin with a quick check: does your purchase event include transaction_id, value, currency, and the full items array with the same item_id used throughout the journey?


Most common mistakes that cost you sales

  1. Different item_id values between view_item, add_to_cart, and purchase.
  2. value doesn’t match the actual paid amount (discounts, VAT, currency).
  3. purchase fires multiple times (or not every time).
  4. No items array in lists and product views – you lose the ability to analyze categories and recommendations.
  5. No validation in DebugView – errors are noticed only in reports weeks later.

What you gain after fixing your tracking

  • Accurate revenue by channel and campaign.
  • A visible purchase funnel: where users drop off and how much it costs.
  • Better decisions: where to shorten checkout, which product pages to improve, where to keep ad budget and where to turn it off.

If you need help implementing or auditing, get in touch – we work with WordPress e-commerce development, PrestaShop modules, ongoing website maintenance, and custom development solutions. More: https://baltsaitas.lt/paslaugos/.


Technical part: how to correctly implement GA4 e-commerce events

Required event set (minimum schema)

  • view_item_list
  • view_item
  • add_to_cart
  • begin_checkout
  • add_shipping_info
  • add_payment_info
  • purchase

At minimum, these events must include the items array. At least the purchase event must contain transaction_id, value, and currency.

Required product fields

item_id, item_name, quantity, price
Additionally recommended: item_brand, item_category, item_variant, discount


Data Layer examples

Product list view (view_item_list)

<script>
dataLayer.push({
  event: 'view_item_list',
  ecommerce: {
    item_list_id: 'category_men',
    item_list_name: 'Men T-shirts',
    items: [
      { item_id: 'SKU-TS-001', item_name: 'T-shirt A', item_category: 'T-shirts', price: 19.99 },
      { item_id: 'SKU-TS-002', item_name: 'T-shirt B', item_category: 'T-shirts', price: 24.99 }
    ]
  }
});
</script>

Product view (view_item)

<script>
dataLayer.push({
  event: 'view_item',
  ecommerce: {
    currency: 'EUR',
    value: 24.99,
    items: [
      { item_id: 'SKU-TS-002', item_name: 'T-shirt B', item_category: 'T-shirts', price: 24.99, quantity: 1 }
    ]
  }
});
</script>

Add to cart (add_to_cart)

<script>
dataLayer.push({
  event: 'add_to_cart',
  ecommerce: {
    currency: 'EUR',
    value: 24.99,
    items: [
      { item_id: 'SKU-TS-002', item_name: 'T-shirt B', item_category: 'T-shirts', price: 24.99, quantity: 1 }
    ]
  }
});
</script>

Purchase (purchase)

<script>
dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: 'ORD-100045',
    currency: 'EUR',
    value: 49.98,
    tax: 8.68,
    shipping: 3.99,
    coupon: 'SUMMER10',
    items: [
      { item_id: 'SKU-TS-002', item_name: 'T-shirt B', item_category: 'T-shirts', price: 24.99, quantity: 2, discount: 2.5 }
    ]
  }
});
</script>

Important: item_id must be the same throughout the entire journey. Choose one identifier (SKU/EAN/internal ID) and stick to it.


GTM configuration: tags and triggers

  1. Create a GA4 Configuration tag with your Measurement ID.
  2. For each event create a GA4 Event tag:
    • Event Name: view_item, add_to_cart, purchase, etc.
    • Event Parameters: items, currency, value, coupon, shipping, tax – mapped from the Data Layer.
  3. Triggers: Custom Event based on the event values (view_item, purchase, etc.).
  4. If you use a consent management platform (CMP), enable GTM Consent conditions so tags fire only after consent is given.

Validation: how to make sure everything works

  • GTM Preview: check whether the correct events fire and whether items are present.
  • GA4 DebugView: verify the event stream in real time.
  • After launch, compare 10–20 orders with platform reports; a normal deviation due to blockers is up to ~10%.
  • Monitor Monetization → Ecommerce purchases and create an Explorations funnel: view_item_list → view_item → add_to_cart → begin_checkout → purchase.

Platform nuances

WooCommerce – it’s often worth generating a custom Data Layer instead of using “black box” plugins, especially if you have multi-currency or dynamic pricing.
PrestaShop – check whether items are populated in categories, search, and related products; extend PrestaShop modules if needed.
Laravel/custom – it’s worth having a single server-side function that returns a consistent items structure for all template locations; this simplifies testing and version control.


Error prevention

  • purchase – once per transaction_id. Protect against repeated “Thank you” page reloads.
  • value logic – follow one rule: whether shipping and taxes are included or not.
  • Currency – always EUR if that’s your payment currency.
  • items – must include at least item_id, item_name, quantity, price.
  • Versioning – when changing the Data Layer, tag releases and use a staging environment.

Privacy and reliability

  • Do not send PII (name, email, phone) in GA4 events.
  • If you need higher reliability and less impact from blockers – implement server-side tagging.
  • Use gcs or other hosting that allows you to control headers and traffic flow.

Full pre-launch checklist

  • Events: view_item_list, view_item, add_to_cart, begin_checkout, add_shipping_info, add_payment_info, purchase.
  • Consistent item_id everywhere.
  • purchase: includes transaction_id, value, currency, items.
  • GA4 DebugView shows the full sequence from list to purchase.
  • Product revenue and quantities are visible in Monetization reports.
  • Internally used keywords: WordPress e-commerce development, website maintenance, corporate website development, custom development solutions, PrestaShop modules.

More information

Official GA4 e-commerce documentation:
https://developers.google.com/analytics/devguides/collection/ga4/ecommerce

Order a website
Scroll to Top