Sub topic 8
Checkout Events: begin_checkout, add_shipping_info, and add_payment_info
This chapter covers the three checkout events that sit between the cart and the purchase. It assumes you can build an items array, set currency and value correctly, and send events with gtag.js or the GTM dataLayer. It also assumes you have seen the cart events (add_to_cart, view_cart).
What the checkout events are for
The checkout events record how far a shopper gets before paying. Each one marks a step in the funnel:
begin_checkout: the shopper starts the checkout process.add_shipping_info: the shopper submits a shipping method or address step.add_payment_info: the shopper submits a payment method.purchase: the order is confirmed (covered in the next chapter).
GA4 does not require all of these. You can send only the ones that match your real checkout. But each event you send gives you one more drop-off point to measure.
begin_checkout
Send begin_checkout once, when the shopper enters the checkout flow. This is usually when they click the "Checkout" button or when the first checkout page loads.
The event takes these parameters:
currency: a three-letter ISO 4217 code such asUSD. It is required whenever you sendvalue.value: the total value of the items in the cart.coupon: optional. A coupon code already applied.items: the array of products in the checkout.
gtag('event', 'begin_checkout', {
currency: 'USD',
value: 49.98,
coupon: 'SUMMER_SALE',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 2
}
]
});The value here is the sum of price times quantity for each item, which is 24.99 × 2 = 49.98. Keep the rule the same for every event in the funnel. If begin_checkout reports a value computed one way and purchase another, funnel value comparisons become misleading.
add_shipping_info
Send add_shipping_info when the shopper confirms how the order will be delivered. This event adds one parameter to the checkout set:
shipping_tier: a string describing the delivery option, such asGround,Express, orStore Pickup.
gtag('event', 'add_shipping_info', {
currency: 'USD',
value: 49.98,
coupon: 'SUMMER_SALE',
shipping_tier: 'Ground',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 2
}
]
});Use a small, fixed vocabulary for shipping_tier. Values like Ground, ground, and Ground Shipping appear as three separate values in reports. Pick one spelling and send it from one place in your code.
add_payment_info
Send add_payment_info when the shopper submits a payment method. Do this when they submit the step, not when they merely open the payment form. The extra parameter is:
payment_type: a string such asCredit Card,PayPal, orGift Card.
gtag('event', 'add_payment_info', {
currency: 'USD',
value: 49.98,
coupon: 'SUMMER_SALE',
payment_type: 'Credit Card',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 2
}
]
});Never put card numbers, billing addresses, or any other personal data in payment_type or any other parameter. Send only the method name. Google's policies prohibit sending personally identifiable information to GA4.
Comparing the three events
| Event | Fires when | Extra parameter | Typical mistake |
|---|---|---|---|
| `begin_checkout` | The shopper enters checkout | None beyond the shared set | Firing on every checkout page view |
| `add_shipping_info` | The shipping step is submitted | `shipping_tier` | Inconsistent tier spellings |
| `add_payment_info` | The payment step is submitted | `payment_type` | Firing when the form opens, not on submit |
All three share currency, value, coupon, and items.
Sending them through the GTM dataLayer
With Google Tag Manager, you push the same data to the dataLayer and let a GA4 event tag read it. Clear the ecommerce object before each push so stale values do not carry over.
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'add_shipping_info',
ecommerce: {
currency: 'USD',
value: 49.98,
shipping_tier: 'Ground',
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 2
}
]
}
});In GTM, create a GA4 event tag whose event name matches the dataLayer event value. Enable the option to send e-commerce data from the dataLayer, and trigger the tag on a custom event of the same name.
Edge cases
- Single-page checkouts. If shipping and payment share one page, you may not be able to separate the steps. Send
begin_checkouton entry and fire the other two when their fields are submitted, or skip the ones you cannot tell apart. - Reloads and back-navigation. A shopper who refreshes the checkout page can trigger
begin_checkoutagain. Guard the call, for example with a flag insessionStorage, so one checkout attempt produces one event. - Changing carts. If the shopper edits quantities mid-checkout, later events should carry the updated
itemsandvalue. - Shipping in
value. For these events,valuerepresents the items. Do not add shipping cost unless you apply the same rule to every event in your funnel. - Missing currency. An event with
valuebut nocurrencyis not usable for revenue analysis. Always send both.
Validating
Open DebugView and walk through checkout on a test device. For each event, confirm that:
- the event appears once per step,
currencyandvalueare present,itemsshows the expected product count,shipping_tierorpayment_typeappears on the right event.
The funnel exploration report in GA4 can then use these three events as steps. Use an open or closed funnel depending on whether shoppers can enter mid-way.
Exercise
A shopper reloads the first checkout page three times, then completes checkout. Your funnel report shows begin_checkout count is much higher than the number of shoppers. What is the likely cause, and how do you fix it?
Show answer
The begin_checkout event is firing on every load of the checkout page, so each reload sends another event. Fix it by firing the event only once per checkout attempt, for example by setting a sessionStorage flag after the first send, or by triggering on the click that starts checkout rather than on page load.
Exercise
Which parameter would you add to addpaymentinfo to record that the shopper chose PayPal, and what must you never include in it?
Show answer
Use payment_type with a value such as "PayPal". Never include card numbers, billing addresses, or other personal data.