Skip to content

The GA4 e-commerce events that build the funnel, from view_item to purchase

Funnel, cart, and checkout

By Boris Parov8 min read

Lire cet article en français

GA4 ecommerce events are a measurement contract: six recommended events, each with required parameters and an items array. On Google's public sample, January 2021, 300 of 1,204 purchase events arrive without a transaction_id. This article reads the contract, then checks it, following our guide to checkout funnel analysis with GA4.

Which GA4 ecommerce events build the funnel, and what must each one carry?

Six recommended Google Analytics 4 (GA4) ecommerce events build the funnel. Google's event reference marks items as required on all six. It also requires currency whenever value is sent, and transaction_id on purchase. Everything else is optional, and optional parameters are where most funnels lose detail.

A recommended event is a GA4 event whose name and parameters Google defines in advance. Reports, explorations, and the BigQuery export (raw export) then read it the same way on every site. A renamed event, such as checkout_start, is a custom event: no standard report picks it up.

A checkout funnel is an ordered sequence of e-commerce events that a session is expected to cross, from the product view to the purchase. Each step counts the sessions that reached it. The difference between two consecutive steps is the drop-off.

StepGA4 eventRequired by Google's referenceOptional, worth sending
1view_itemitems; currency when value is sentvalue
2add_to_cartitems; currency when value is sentvalue
3begin_checkoutitems; currency when value is sentvalue, coupon
4add_shipping_infoitems; currency when value is sentshipping_tier, coupon
5add_payment_infoitems; currency when value is sentpayment_type, coupon
6purchaseitems, transaction_id; currency when value is sentshipping, tax, coupon, customer_type

Google's ecommerce guide lists eight more recommended events: lists, promotions, cart views and removals, wishlists, and refunds. None of them is a funnel step, but each one explains a step. A site without view_cart cannot tell a cart page view from a cart addition.

The items array: what should it carry at each step?

The items array should carry the products the event is about, and nothing else. On view_item, that is the product on screen. On add_to_cart, it is the product added. From checkout onward, it is the content of the cart.

The items array is the repeated record of the GA4 export that lists the products attached to one event. It holds one entry per product, with fields such as item_id, item_name, price, and quantity. Google requires item_id or item_name in each entry and accepts up to 200 entries per event. Where items sits next to event_params in each row is covered in The GA4 export schema: events, event_params, and items explained.

The query below takes an inventory of the 14 recommended ecommerce events in January 2021. For each event present, it counts events, sessions, and the size of the items array.

SELECT
  event_name,
  COUNT(*) AS events,
  COUNT(DISTINCT CONCAT(user_pseudo_id, '-', CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions,
  COUNTIF(ARRAY_LENGTH(items) = 0) AS events_without_items,
  COUNTIF(ARRAY_LENGTH(items) = 1) AS events_with_one_item,
  MAX(ARRAY_LENGTH(items)) AS max_items_per_event
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
  AND event_name IN ('view_item_list', 'select_item', 'view_item', 'add_to_cart', 'add_to_wishlist', 'view_cart', 'remove_from_cart',
    'begin_checkout', 'add_shipping_info', 'add_payment_info', 'purchase', 'refund', 'view_promotion', 'select_promotion')
GROUP BY event_name
ORDER BY events DESC
EventEventsSessionsEvents without itemsEvents with one itemMax items per event
view_item86,97123,10526,2212,29712
add_to_cart15,5224,537058112
begin_checkout11,0342,15906,41427
add_shipping_info3,9522,1593,95200
add_payment_info2,8411,5602,84100
purchase1,2041,115066821

Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).

Two defects show up. First, 26,221 view_item events, 30.1% rounded to one decimal, carry no items. Second, only 581 of the 15,522 add_to_cart events carry a single item. Most carry up to 12, which looks like a product list attached to the event. Either way, "which product was added" has no clean answer on the sample. Four recommended events return no row at all: view_cart, remove_from_cart, add_to_wishlist, and refund.

Are add_shipping_info and add_payment_info optional steps?

The add_shipping_info and add_payment_info events are recommended, yet many checkouts lack a separate step for one. A wallet payment can skip add_payment_info entirely. The funnel then shows a step that measures nothing, or loses buyers who never saw it.

The public sample shows the first case. add_shipping_info fires in exactly the same 2,159 sessions as begin_checkout. Step 4 therefore adds no information to step 3: the delivery drop-off is invisible. Both events also arrive with an empty items array, on 3,952 and 2,841 events. A product-level reading of the checkout steps is impossible on the sample.

The two step parameters are optional in Google's reference: shipping_tier and payment_type. Without them, the funnel says that a step was crossed, never how. With them, the drop-off can be split by delivery option or payment method.

Decide one rule per step and write it down. Either the step exists and its event fires alone. Or it does not exist, and the funnel skips it. A step that fires with its neighbor is a tagging choice, not a behavior. Which checkout step really loses buyers is covered in Shipping, payment, account creation: where checkout breaks.

How do you check the contract in the export, by step and by day?

The contract is checked with two counts per day: sessions per step, and events missing a required parameter. A monthly total hides the date of a break; a daily series shows it. The query below counts, per day, the sessions with begin_checkout and with add_shipping_info. It also counts purchase events whose transaction_id is (not set). It then groups January 1 to 25 and shows the last six days one by one.

A measurement contract is the written list of events, parameters, and items that a site commits to send at each funnel step. It is the tracking plan, turned into tests. The raw export is checked against it every day, so a broken tag shows up as a failed test.

WITH events AS (
  SELECT
    event_date,
    event_name,
    ecommerce.transaction_id AS transaction_id,
    CONCAT(user_pseudo_id, '-', CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING)) AS session_id
  FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
    AND event_name IN ('begin_checkout', 'add_shipping_info', 'purchase')
),
daily AS (
  SELECT
    event_date,
    COUNT(DISTINCT IF(event_name = 'begin_checkout', session_id, NULL)) AS checkout_sessions,
    COUNT(DISTINCT IF(event_name = 'add_shipping_info', session_id, NULL)) AS shipping_sessions,
    COUNTIF(event_name = 'purchase') AS purchase_events,
    COUNTIF(event_name = 'purchase' AND transaction_id = '(not set)') AS purchases_without_id
  FROM events
  GROUP BY event_date
)
SELECT
  IF(event_date < '20210126', '20210101-20210125', event_date) AS period,
  COUNT(*) AS days,
  COUNTIF(shipping_sessions = checkout_sessions) AS days_shipping_equals_checkout,
  SUM(purchase_events) AS purchase_events,
  SUM(purchases_without_id) AS purchases_without_id,
  ROUND(100 * SUM(purchases_without_id) / SUM(purchase_events), 1) AS pct_without_id
FROM daily
GROUP BY period
ORDER BY period
PeriodDaysDays where shipping sessions = checkout sessionspurchase eventsWithout transaction_idShare without transaction_id
2021-01-01 to 2021-01-252525922687.4%
2021-01-2611553360.0%
2021-01-2711544277.8%
2021-01-2811696492.8%
2021-01-2911544888.9%
2021-01-3011312683.9%
2021-01-31111919100.0%

Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).

The monthly share is 300 of 1,204 events, 24.9%. That number hides the break. Before January 26, 7.4% of purchases lack an ID; after it, 232 of 282 do. The split date comes from reading the daily series first. Google warns that the sample's internal consistency is limited by obfuscation, so the break may be an artifact. On a production site, the first suspect is a release on that date.

The same daily count catches an event that stops firing. On the sample, add_to_cart is absent on most days of November 2020.

SELECT
  COUNT(*) AS days,
  COUNTIF(add_to_cart_events = 0) AS days_without_add_to_cart
FROM (
  SELECT _TABLE_SUFFIX AS day, COUNTIF(event_name = 'add_to_cart') AS add_to_cart_events
  FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20201101' AND '20201130'
  GROUP BY day
)
November 2020Value
Days in the export30
Days without a single add_to_cart event18

Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).

A cart step missing on 18 days traps any calculation over the sample's 92 days.

Duplicate purchase events and transaction_id: one order or two?

transaction_id is the only field that tells one order from one purchase event. Google requires it on purchase. Its help page says GA4 deduplicates purchase events that share a transaction ID, on web streams only. It also says never to send an empty string as the ID. The page does not mention the BigQuery export.

A duplicate purchase is a second purchase event that carries a transaction_id already received. It typically comes from a reloaded or revisited confirmation page. It inflates orders and revenue unless the SQL keeps one event per ID.

WITH purchases AS (
  SELECT
    CONCAT(user_pseudo_id, '-', CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING)) AS session_id,
    NULLIF(ecommerce.transaction_id, '(not set)') AS transaction_id,
    (SELECT COUNTIF(item_id = '(not set)') FROM UNNEST(items)) > 0 AS has_unidentified_item
  FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
  WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
    AND event_name = 'purchase'
),
per_session AS (
  SELECT session_id, COUNT(*) AS purchase_events, LOGICAL_OR(transaction_id IS NOT NULL) AS has_transaction_id
  FROM purchases
  GROUP BY session_id
)
SELECT
  (SELECT COUNT(*) FROM purchases) AS purchase_events,
  (SELECT COUNTIF(transaction_id IS NULL) FROM purchases) AS events_without_transaction_id,
  (SELECT COUNTIF(transaction_id IS NULL AND has_unidentified_item) FROM purchases) AS of_which_item_not_set,
  (SELECT COUNTIF(transaction_id IS NOT NULL) FROM purchases) AS events_with_transaction_id,
  (SELECT COUNT(DISTINCT transaction_id) FROM purchases) AS distinct_transaction_ids,
  (SELECT COUNT(*) FROM per_session) AS purchase_sessions,
  (SELECT COUNTIF(purchase_events > 1) FROM per_session) AS sessions_with_several_purchases,
  (SELECT COUNTIF(NOT has_transaction_id) FROM per_session) AS sessions_without_any_transaction_id
Measure, January 2021Value
purchase events1,204
Events without transaction_id, all with an item_id of (not set)300
Events with a transaction_id904
Distinct transaction_id values (orders)894
Sessions with at least one purchase1,115
Sessions with more than one purchase event49
Purchase sessions without any transaction_id270

Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).

The export keeps both rows of a duplicate: 904 events carry an ID, for 894 distinct IDs. Ten events are repeats. Counting orders therefore means COUNT(DISTINCT transaction_id), never COUNT(*). The 300 events without an ID cannot be deduplicated at all. They also carry an item without an item_id, so product revenue loses them too.

What does a gap in the events do to the funnel?

A gap in the events moves a funnel rate without any change in buyer behavior. The table maps the five defects found on the sample.

Gap in the contractWhat the funnel showsOn the public sample, January 2021
A recommended event never firesA 100% drop, if the funnel uses it as a stepview_cart and remove_from_cart absent
A step fires with the previous oneA step that adds no informationadd_shipping_info in the same 2,159 sessions as begin_checkout
items empty or overloadedNo reading by product at that step26,221 view_item events empty; shipping and payment events always empty
transaction_id missingFewer orders than purchase sessions270 of 1,115 purchase sessions without any ID
purchase repeatedMore events than orders10 repeat events for 894 orders

The missing ID is the costliest gap. Counted by session, the purchase step holds 1,115 sessions. Counted by identified order, it holds 845 sessions, 24.2% fewer. Every abandonment rate built on orders then rises, with no buyer behaving differently. The same trap, on carts bought in a later session, is in Measuring cart abandonment with GA4 and BigQuery without overstating it.

The fix is never in the funnel query. It is in the tag, and the funnel only reports the damage. That is why the contract test runs before the funnel, every day. How a single tagging defect spreads through every report is in Tracking health: the GA4 tagging flaw that skews everything.

FAQ

Do I need all six ecommerce events for a GA4 funnel?

A GA4 funnel needs at least view_item, add_to_cart, begin_checkout, and purchase to cover the journey. The shipping and payment events are worth sending only when the checkout has those steps. Send them alone, at the moment the step is completed. Fired together with begin_checkout, they add a step that measures nothing.

Does the BigQuery export deduplicate purchase events?

On the public sample, the BigQuery export keeps duplicate purchase events. In January 2021, 904 events carry a transaction_id, for 894 distinct IDs. Google's help page describes deduplication in GA4 for web streams but does not mention the export. Deduplicate in SQL: count orders with COUNT(DISTINCT transaction_id), and keep one event per ID for revenue.

What should a transaction_id contain?

A transaction_id should contain the order number from your order system, unique per order. Google's help page asks for a dynamic value, never an empty string, and never shared across users. A fixed or empty ID merges unrelated purchases. Sharing that ID with your back office also lets you reconcile GA4 with your orders.

The rates built on these events, step by step, are in E-commerce checkout funnel: step-by-step drop-off analysis with GA4. Your own contract can be checked on your raw GA4 export. Book a diagnostic.

Sources