---
title: "Key events and e-commerce tracking | Optimize All Academy"
description: "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…"
url: https://optimizeall.com/learn/web-analytics-with-ga4/key-events-and-ecommerce
updated: 2026-10-05
---

Web Analytics with Google Analytics 4 · The GA4 data model · lesson 5 of 20 · 12 min

# Key events and e-commerce tracking

## 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 model | Typical key events | Usually NOT key events |
|---|---|---|
| E-commerce | `purchase`, possibly `begin_checkout` | `view_item`, `scroll` |
| Lead generation | `generate_lead`, `book_appointment` (custom) | `page_view` of contact page |
| SaaS | `sign_up`, `purchase` | `login` |
| Publisher | `sign_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):

| Step | Users | Step conversion |
|---|---|---|
| view_item | 20,000 | — |
| add_to_cart | 3,000 | 15% |
| begin_checkout | 1,800 | 60% |
| add_shipping_info | 1,500 | 83% |
| add_payment_info | 700 | 47% |
| purchase | 560 | 80% |

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):

```javascript
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:

```sql
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

- [ ] Every funnel event fires once, at the right moment
- [ ] `items` array populated consistently across all events
- [ ] `purchase` has unique `transaction_id`, numeric `value`, ISO `currency`
- [ ] Refund or cancellation process defined
- [ ] Key events limited to true business outcomes

## Video lecture: Key events and e-commerce tracking

Lecture coming soon · 15 chapters · about 8 minutes. Read the full transcript below.

1. Key events and e-commerce
2. Why it matters
3. Key events versus Ads conversions
4. Choosing key events
5. The e-commerce event set
6. Three revenue rules
7. Cash on delivery
8. Example 1: finding the leak
9. Example 2: Riyadh retailer
10. Watch me do it, part 1
11. Watch me do it, part 2
12. Ads in 2026
13. Common mistakes
14. Recap
15. Try this now

## Lecture transcript

### Key events and e-commerce

In twenty twenty-four, Google renamed conversions in G A four to key events. It sounds like a small wording change, but it confuses agencies and clients to this day, because Google Ads still uses the word conversions. In this lecture you'll learn what key events are, how to choose them, how G A four's e-commerce events and items array work, the three rules that prevent almost every revenue problem, and how to handle markets where cash on delivery means a purchase isn't really a purchase yet.

### Why it matters

Why does this matter? Because key events power conversion-focused reporting, and revenue numbers drive budget decisions. If a key event fires on the wrong trigger, conversion rates look better than reality. If a purchase fires twice, revenue inflates. If currency is missing, revenue may not record correctly. And if refunds never flow back, G A four revenue drifts higher than your real sales every month. Each of these errors ends up in a board meeting as a confident, wrong number.

### Key events versus Ads conversions

Here's the distinction. A key event in G A four is an important action for analysis in your property. A conversion in Google Ads is an action configured or imported into Ads to measure and optimize campaigns. Think of key events as the goals on your team's whiteboard, and Ads conversions as the specific signals you hand to the Ads bidding system. You might import a key event into Ads as a conversion, but they're separate settings in separate products.

### Choosing key events

How do you choose key events? Keep the list short: your macro conversions, plus one or two critical micro conversions. For e-commerce, purchase, and perhaps begin checkout. For lead generation, generate lead or a book appointment event. For software, sign up and purchase, not login. For publishers, a newsletter sign up or subscription. If everything is a key event, nothing is. You can also assign a default value to a key event, or send a dynamic value and currency, so reports can show key event value alongside revenue.

### The e-commerce event set

Next, the e-commerce event set. A typical retail funnel runs view item list, select item, view item, add to cart, view cart, begin checkout, add shipping info, add payment info, purchase, and refund. Each carries an items array. Each item should have at least an item id or name, and ideally price, quantity, category, brand and variant. The purchase event also needs a transaction id, value and currency, and optionally tax, shipping and coupon. E-commerce reports depend on these exact names and parameters.

### Three revenue rules

Here are the three rules that prevent most revenue problems. One: always send a unique transaction id. G A four uses it to deduplicate purchases, for example when a buyer reloads the confirmation page. Two: always send currency as an I S O code, like U S D, G B P, A E D, S A R or P K R. Three: agree what value includes. Tax? Shipping? Document it. Finance numbers will differ anyway, because of refunds, cancellations and refused deliveries. So define the relationship instead of hoping the numbers match.

### Cash on delivery

Now cash on delivery, common in Pakistan and parts of the Gulf. An online purchase is really an order, and some are refused at the door. You have two acceptable options. Track purchase at order time, then send refund events for refused orders, using the Measurement Protocol or a data import. Or track a custom place order event, and report realized revenue from your order system. Either works if it's documented and used consistently. What doesn't work is pretending every order was paid.

### Example 1: finding the leak

First example, a simple one. An electronics store sees add to cart rising but purchases flat. The funnel, with illustrative numbers: twenty thousand view item, three thousand add to cart, eighteen hundred begin checkout, fifteen hundred add shipping info, seven hundred add payment info, and five hundred sixty purchases. The steepest avoidable drop is between shipping and payment, under fifty percent. Segmenting by device shows mobile users abandon far more at payment. That points to a payment form or wallet issue, not pricing.

### Example 2: Riyadh retailer

Second example, a business case. A Riyadh electronics retailer offers cash on delivery. They track purchase at order placement, then send refund events through the Measurement Protocol when couriers report refused deliveries. Every week, the analyst compares G A four revenue net of refunds with delivered revenue from the order system. The gap is documented and stable, so it becomes a known quantity rather than a monthly argument. And the team can see which channels bring customers who actually accept deliveries.

### Watch me do it, part 1

Watch me write a purchase push. First, I clear the previous e-commerce object by pushing e-commerce null, so values don't leak from an earlier event. Then I push event purchase with an e-commerce object: transaction id O R D one oh four five two two, value one forty-nine as a number, not a string, currency A E D, shipping fifteen, coupon E I D ten, and an items array with one abaya: its id, name, category, price and quantity. Google Tag Manager reads this and sends the G A four event.

### Watch me do it, part 2

Then I check for duplicates in the BigQuery export, which the interface quietly hides. I select the transaction id and count purchase events for September, grouped by transaction id, keeping only those with more than one event. If any rows come back, orders are being counted twice, usually from confirmation page reloads or two tags firing. On a healthy setup, this query returns nothing. I schedule it weekly, so duplicates are caught before they reach a report.

### Ads in 2026

And one more twenty twenty-six consideration: Google Ads. If you import a G A four key event into Ads as a conversion for bidding, make sure the same action isn't also tracked by a separate Ads conversion tag, or you'll double count in Ads. Decide which source Ads should optimize on, and write it down. And check consent mode, because Ads measurement depends on the consent signals: ad storage, ad user data and ad personalization.

### Common mistakes

Common mistakes. Missing or duplicated transaction ids, inflating revenue. Sending value as a string with a currency symbol. 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. And forgetting refunds, so G A four revenue drifts ever higher than actual sales.

### Recap

Recap. G A four calls important outcomes key events, while Google Ads uses conversions. Keep key events few. E-commerce reports rely on recommended events with an items array. A unique transaction id, an I S O currency and a documented definition of value are non-negotiable. Handle cash on delivery with refunds or a separate order event. And check duplicates in the export.

### Try this now

Try this now. Write the full purchase push, with items, for a real or imagined order. Then list three ways that number could differ from finance's figure, like refunds, tax or refused deliveries, and write one sentence for each explaining how you'd reconcile it. If you have BigQuery export, run the duplicate check query.

## 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.

## Try it

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.

- [Previous: Events, parameters and user properties](https://optimizeall.com/learn/web-analytics-with-ga4/events-parameters-user-properties)
- [Next: Custom definitions, scopes and core metrics](https://optimizeall.com/learn/web-analytics-with-ga4/custom-definitions-and-metrics)
- [All lessons of Web Analytics with Google Analytics 4](https://optimizeall.com/learn/web-analytics-with-ga4)
