begin_checkout
The begin_checkout event marks the moment a user crosses from browsing and cart management into the checkout funnel. It’s a high-intent signal and the gate event for your checkout funnel analysis in GA4. Every checkout step event that follows — add_shipping_info, add_payment_info, purchase — should have consistent cart data, starting with what you push here.
When to fire
Section titled “When to fire”Fire begin_checkout when:
- The user clicks the “Checkout” or “Proceed to Checkout” button
- The checkout page first loads (for multi-page checkouts)
- The user enters step 1 of a single-page checkout form
Do not fire multiple times if the user navigates back and forward through checkout steps. begin_checkout is the initiation event — it fires once per checkout session.
Complete dataLayer push
Section titled “Complete dataLayer push”// Always clear previous ecommerce data firstdataLayer.push({ ecommerce: null });
dataLayer.push({ event: 'begin_checkout', ecommerce: { currency: 'USD', value: 174.47, coupon: 'SUMMER15', // order-level coupon if applied items: [ { item_id: 'SKU-001-BLK-L', item_name: 'Classic Leather Jacket', item_brand: 'Heritage Co.', item_category: 'Apparel', item_category2: 'Outerwear', item_variant: 'Black / Large', price: 89.99, quantity: 1, coupon: 'SUMMER15', // item-level coupon if different from order coupon discount: 13.50, affiliation: 'Online Store' }, { item_id: 'SKU-047-WHT-M', item_name: 'Cotton Crew T-Shirt', item_brand: 'Heritage Co.', item_category: 'Apparel', item_category2: 'Tops', item_variant: 'White / Medium', price: 24.99, quantity: 2, coupon: '', discount: 0, affiliation: 'Online Store' }, { item_id: 'SKU-112-TAN-34', item_name: 'Woven Leather Belt', item_brand: 'Heritage Co.', item_category: 'Accessories', item_category2: 'Belts', item_variant: 'Tan / 34', price: 34.50, quantity: 1, coupon: '', discount: 0, affiliation: 'Online Store' } ] }});Event schema
Section titled “Event schema”| Parameter | Type | Required | Description |
|---|---|---|---|
| event | string | Required | Must be "begin_checkout" |
| ecommerce.currency | string | Required | ISO 4217 currency code. |
| ecommerce.value | number | Required | Cart total — sum of (price × quantity) for all items, after any discounts. |
| ecommerce.coupon | string | Optional | Order-level coupon code if one has been applied. |
| ecommerce.items[] | Array<Item> | Required | All items in the cart at checkout initiation. |
| items[].item_id | string | Required | SKU or variant-level product identifier. |
| items[].item_name | string | Required | Product name. |
| items[].item_brand | string | Optional | Brand or manufacturer. |
| items[].item_category | string | Optional | Primary product category. |
| items[].item_variant | string | Optional | Selected variant. |
| items[].price | number | Optional | Unit price. |
| items[].quantity | number | Optional | Quantity in cart. |
| items[].coupon | string | Optional | Item-level coupon code. |
| items[].discount | number | Optional | Monetary discount applied to this item. |
| items[].affiliation | string | Optional | Store or seller affiliation. |
GTM configuration
Section titled “GTM configuration”-
Create a Custom Event trigger. Event name:
begin_checkout. Name itCE - begin_checkout. -
Create Data Layer Variables for
ecommerce.currency,ecommerce.value,ecommerce.coupon, andecommerce.items. -
Create the GA4 Event tag. Event name:
begin_checkout. Enable Send Ecommerce data. Addcurrency,value, andcouponas explicit event parameters. -
Test in Preview mode. Add items to cart, apply a coupon, then click Checkout. Verify the coupon code appears at both the event and item levels, and that the value reflects post-discount pricing.
Common mistakes
Section titled “Common mistakes”Firing on every checkout page navigation. If checkout is multi-page and the user goes back to cart and re-initiates checkout, should begin_checkout fire again? Technically yes — it’s a new checkout initiation. But if your site counts each browser-forward click on the checkout button as a new session, use a sessionStorage flag to prevent duplicate fires within the same checkout attempt.
Not including coupon data. The coupon parameter is one of the most valuable fields for promotion analysis. If you have a coupon system, always include the active coupon code. An empty string for no coupon is fine and expected.
Inconsistent cart value between view_cart and begin_checkout. If the user doesn’t change their cart between viewing it and clicking Checkout, these values should match. Discrepancies signal a calculation bug.