add_shipping_info
The add_shipping_info event fires when a user completes the shipping step of checkout — when they’ve selected a shipping method and continued to the next step. The shipping_tier parameter captures which shipping option they chose, giving you data on how shipping preferences affect checkout completion.
When to fire
Section titled “When to fire”Fire add_shipping_info when:
- The user selects a shipping method and clicks “Continue” to proceed to payment
- The shipping step is completed in a single-page checkout flow
- The user confirms their shipping address and method
Do not fire it when the user merely loads the shipping step — fire when they complete it and advance.
Complete dataLayer push
Section titled “Complete dataLayer push”// Always clear previous ecommerce data firstdataLayer.push({ ecommerce: null });
dataLayer.push({ event: 'add_shipping_info', ecommerce: { currency: 'USD', value: 174.47, coupon: 'SUMMER15', shipping_tier: 'Standard Shipping', // the selected shipping method 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', 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 "add_shipping_info" |
| ecommerce.currency | string | Required | ISO 4217 currency code. |
| ecommerce.value | number | Required | Cart subtotal (before shipping cost is added). |
| ecommerce.coupon | string | Optional | Order-level coupon code if applied. |
| ecommerce.shipping_tier | string | Optional | The selected shipping method. Use your display labels: "Standard Shipping", "Express", "Next Day Delivery". |
| ecommerce.items[] | Array<Item> | Required | All items in the cart. |
| items[].item_id | string | Required | SKU or variant-level product identifier. |
| items[].item_name | string | Required | Product name. |
| items[].item_brand | string | Optional | Brand. |
| items[].item_category | string | Optional | Primary category. |
| items[].item_variant | string | Optional | Selected variant. |
| items[].price | number | Optional | Unit price. |
| items[].quantity | number | Optional | Quantity. |
| items[].coupon | string | Optional | Item-level coupon. |
| items[].discount | number | Optional | Item-level discount. |
Shipping tier values
Section titled “Shipping tier values”The shipping_tier parameter is a free-form string. Use human-readable labels that match what users see in the checkout UI. Be consistent across your implementation — the same shipping option should always have the same shipping_tier value.
// ✅ Consistent, readableshipping_tier: 'Standard Shipping' // 5-7 business daysshipping_tier: 'Express Shipping' // 2-3 business daysshipping_tier: 'Next Day Delivery'shipping_tier: 'Store Pickup'shipping_tier: 'Same Day Delivery'
// ❌ Inconsistent or crypticshipping_tier: 'standard'shipping_tier: 'std_ship_5d'shipping_tier: '2' // an internal codeGTM configuration
Section titled “GTM configuration”-
Create a Custom Event trigger. Event name:
add_shipping_info. Name itCE - add_shipping_info. -
Create Data Layer Variables for
ecommerce.currency,ecommerce.value,ecommerce.coupon,ecommerce.shipping_tier, andecommerce.items. -
Create the GA4 Event tag. Event name:
add_shipping_info. Enable Send Ecommerce data. Addcurrency,value,coupon, andshipping_tieras explicit event parameters. -
Test in Preview mode. Navigate through the shipping step, select a method, and continue. Confirm
shipping_tiershows the selected method label.
Common mistakes
Section titled “Common mistakes”Firing when the shipping step loads, not when it’s completed. If you fire on step entry, users who see the shipping options and go back are counted as if they completed the step. Fire on “Continue to Payment” click or equivalent step completion action.
Hardcoding a default shipping tier. If you always push shipping_tier: 'Standard' regardless of what the user selected, your shipping preference analysis is meaningless. Dynamically set this value from the checkout form state.