Web Analytics with Google Analytics 4The GA4 data model · Lesson 5 of 20

Key events and e-commerce tracking

Article · 12 min · 8 min lecture

Video lecture

Key events and e-commerce tracking

15 chapters · about 8 min · full transcript

Coming soon

Chapter 1 of 15

Key events and e-commerce

  • Key events versus Ads conversions
  • Choosing key events
  • The e-commerce event set
  • Three revenue rules
  • Cash on delivery

The narrated lecture is in production

Every chapter is scripted and ready. Browse the chapters and read the full transcript now — the video will appear here when it’s published.

Chapters

Key events: signaling what matters

In GA4 you can mark any event as a key event — the property's way of saying "this is an important outcome". Google renamed GA4 "conversions" to key events in 2024, reserving the word "conversions" for events used for measurement and bidding in Google Ads. The distinction matters in agency conversations:

  • Key event (GA4): an important action for analysis in your property.
  • Conversion (Google Ads): an action imported or configured in Google Ads to measure and optimize campaigns.

Keep the list of key events short — typically your macro conversions plus one or two critical micro conversions. If everything is a key event, nothing is.

Choosing key events

Business modelTypical key eventsUsually NOT key events
E-commercepurchase, possibly begin_checkoutview_item, scroll
Lead generationgenerate_lead, book_appointment (custom)page_view of contact page
SaaSsign_up, purchaselogin
Publishersign_up (newsletter), subscribe (custom)file_download of every PDF

You can also assign a default value to a key event, or send a dynamic value and currency parameter, which lets reports show key event value alongside revenue.

The e-commerce event set

GA4's e-commerce reports depend on recommended events with specific parameters. A typical retail funnel:

view_item_list   -> user sees a category or search results
select_item      -> user clicks a product in a list
view_item        -> product page viewed
add_to_cart      -> item added
view_cart        -> cart viewed
begin_checkout   -> checkout started
add_shipping_info / add_payment_info
purchase         -> order completed
refund           -> full or partial refund

Each carries an items array. Each item should include at least item_id or item_name, and ideally price, quantity, item_category, item_brand and item_variant. The purchase event additionally needs transaction_id, value, currency, and optionally tax, shipping and coupon.

purchase
  transaction_id: "ORD-104522"
  value: 149.00
  currency: "AED"
  coupon: "EID10"
  shipping: 15.00
  items:
    - item_id: "SKU-ABAYA-021"
      item_name: "Linen abaya"
      item_category: "womenswear"
      price: 134.00
      quantity: 1

Getting revenue right

Three rules prevent most revenue problems:

  1. Always send a unique transaction_id. GA4 uses it to deduplicate purchases, for example when a buyer reloads the confirmation page.
  2. Always send currency as an ISO code (USD, GBP, AED, SAR, PKR). Without it, revenue may not be recorded correctly. GA4 converts to the property's reporting currency.
  3. Agree what value includes. Decide whether it includes tax and shipping and document it. Finance numbers will differ anyway (refunds, cancellations, cash on delivery rejections), so define the relationship rather than hoping they match.

Cash on delivery and offline completion

In markets where cash on delivery is common — including Pakistan and parts of the Gulf — an online "purchase" is really an order. Some orders are refused at the door. Options:

  • Track purchase at order time, then send refund events (via the Measurement Protocol or a data import) for refused orders.
  • Or track a custom place_order event and report realized revenue from your order system.

Either is acceptable if it is documented and used consistently.

Worked example: finding the leak

An electronics store sees add-to-cart counts rising but purchases flat. Using an e-commerce funnel (illustrative numbers):

StepUsersStep conversion
view_item20,000—
add_to_cart3,00015%
begin_checkout1,80060%
add_shipping_info1,50083%
add_payment_info70047%
purchase56080%

The steepest avoidable drop is between shipping and payment. Segmenting by device reveals mobile users abandon far more at payment — pointing to a payment-form or wallet-support issue, not a pricing problem.

Hands-on: a correct purchase push and a duplicate check

The data layer push for a purchase (Google Tag Manager reads it and sends the GA4 event):

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ ecommerce: null });           // clear the previous ecommerce object
window.dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: 'ORD-104522',                     // unique per order
    value: 149.00,                                     // number, not "AED 149"
    currency: 'AED',                                   // ISO 4217 code
    shipping: 15.00,
    coupon: 'EID10',
    items: [{ item_id: 'SKU-ABAYA-021', item_name: 'Linen abaya',
              item_category: 'womenswear', price: 134.00, quantity: 1 }]
  }
});

Then check for duplicates in the BigQuery export (module 7), which the interface hides:

SELECT ecommerce.transaction_id, COUNT(*) AS purchase_events
FROM `my-project.analytics_123456789.events_*`
WHERE event_name = 'purchase'
  AND _TABLE_SUFFIX BETWEEN '20260901' AND '20260930'
GROUP BY 1
HAVING COUNT(*) > 1
ORDER BY purchase_events DESC;

Any rows returned are orders counted more than once, usually from confirmation-page reloads or two tags firing.

Key events and Google Ads conversions in 2026

Key events live in GA4. If you import a GA4 key event into Google Ads as a conversion for bidding, make sure the same action is not also tracked by a separate Google Ads conversion tag, or you will double count in Ads. Decide which source Ads should optimize on, document it, and check that consent mode is implemented, because Ads measurement depends on the consent signals (ad_storage, ad_user_data, ad_personalization).

Second worked example: a KSA electronics retailer with cash on delivery

A Riyadh retailer tracks purchase at order placement, then sends refund events through the Measurement Protocol when couriers report refused deliveries. Weekly, the analyst compares GA4 revenue net of refunds with delivered revenue from the order system. The documented, stable gap becomes a known quantity rather than a monthly argument, and the team can still see which channels bring customers who actually accept deliveries.

Common mistakes

  • Missing or duplicated transaction_id, inflating revenue.
  • Sending value as a string with a currency symbol ("AED 149") instead of a number.
  • Firing purchase on a confirmation page that also loads for failed payments.
  • Marking add_to_cart and page_view as key events, diluting conversion rates.
  • Forgetting refunds, so GA4 revenue drifts ever higher than actual sales.

E-commerce QA checklist

Key takeaways

  • GA4 calls important outcomes key events; Google Ads uses the term conversions.
  • Keep key events few — macro conversions plus one or two critical micro steps.
  • E-commerce reports rely on recommended events with an items array.
  • Unique transaction_id and ISO currency are non-negotiable for accurate revenue.

Check your understanding

Quick questions to lock in the lesson. They don’t count towards your certificate.

  1. A store's GA4 revenue is higher than its order system because buyers refresh the thank-you page. What prevents this?
  2. What is the correct format for the value parameter on a purchase?
  3. Which event is the best candidate for a key event on a lead-generation site?

Put it into practice

Write the full purchase event (with items array) for a real or imagined order, then list three ways the number could differ from finance's figure and how you would reconcile them.

Enrol for free to save your progress

Reading is always free. Enrol to keep your place, take the final assessment and earn a verifiable certificate.