SaTracking
Events and dataNEWIntermediate

Build a GA4 ecommerce event sequence

Map product discovery, cart, checkout, and purchase actions to distinct recommended events without counting an entire journey as one step.

Download for AI (.txt)

Measurement topic illustration · SaTracking

Audience and prerequisites

Sequence view_item, add_to_cart, begin_checkout and purchase with shared item fields, then reconcile the event order against a real test order. You need a current event specification, access to product/cart/checkout state, and an identified implementation route (gtag.js or GTM). Skill level: intermediate. Reading time: eight minutes.

1. Break the journey into observable actions

Start with the actions the store can confirm: a product detail displayed (view_item), an item added to the cart (add_to_cart), checkout begun (begin_checkout), shipping or payment information added where applicable, and an order completed (purchase). For lists, use the appropriate list and selection events such as view_item_list and select_item. Use the current recommended-event reference to choose each name and its parameters.

Do not emit every step because a page was visited. For example, fire add_to_cart only after cart state changes and purchase only after order confirmation. Avoid treating a button click as proof that the action completed.

2. Define item and event data

Use the ecommerce event reference to determine which item fields fit each event. Keep item-specific details in the items array and event-level context outside it. Use stable item IDs and controlled values. For purchases, define transaction ID, value, and currency rules separately; the purchase reference explains its transaction and item fields. Do not copy one event's parameter list into every step.

3. Implement one delivery route

With direct gtag.js, send the recommended event after the application confirms the action, with its documented parameters. With GTM, the application may push an ecommerce object into the shared data layer; configure the corresponding GA4 Event tag, trigger, and mappings in GTM. The push itself is not a GA4 event until a tag forwards it. Google's GTM ecommerce guide shows the tag-based setup. Avoid overlapping direct calls and GTM tags for the same event.

4. Test sequence and gaps

In Preview or Tag Assistant, perform one test journey and confirm each event occurs once and in order. Compare event and item values against the product state at that moment. Confirm receipt in GA4 DebugView for the correct property. Check an abandoned checkout and failed payment: neither should create a purchase. A browser event sequence or DebugView arrival does not establish that all reports are processed or that revenue reconciles with orders.

If steps are missing, verify the application state transition and trigger. If order counts duplicate, inspect callbacks, confirmation reloads, and parallel tag routes. If item arrays are empty, trace source data before adding default values.

Privacy and governance

Use no customer identifiers or sensitive checkout values as event parameters. Follow consent requirements and document the business definition of each funnel step. Keep the sequence tied to the store's event contract so a checkout redesign does not silently change event meaning.

For transaction IDs, item arrays, and revenue fields on the final step, see Implement a GA4 purchase event. Use the validation guide to QA the sequence.

Official references

EDITORIAL HISTORY

What changed

  1. v1.0.0
    Initial bilingual guide drafted and checked against linked current Google documentation.
MEASUREMENT SUPPORT

Need a hand with your tracking?

Nicolas Salazar works with teams on analytics, tracking plans, data quality, consent, and implementation.