Skip to main content

Checkout Initiated (checkout_initiated)

Purpose: Track when a user begins the checkout process by viewing the checkout page or proceeding to the payment step. When to Fire: Immediately upon rendering the checkout page or opening the checkout modal. Payload Schema:
FieldTypeDescription
total_valuenumberTotal cart value (totalValue, typically cart_amount).
total_quantitynumberTotal number of items in the cart.
cart_idstringUnique identifier for the cart session.
productsarray of objectsList of cart items, each with detailed fields:
  – skustringProduct SKU.
  – variant_skustringSelected variant SKU.
  – product_categoryarray of objectsCategory hierarchy, each { id, name, provider_id }.
  – modestringOrigin of the item addition ("widget", "search", "category", "collection", "direct").
  – search_termstringUser search input if applicable.
  – search_locationstring"quick" or "page" if from search.
  – categorystringCategory ID or name if from category.
  – collectionstringCollection ID or name if from collection.
  – total_valuenumberExtended sale price (quantity * sale_price).
  – quantitynumberUnits of this SKU in the cart.
  – widget_rulestringRule ID that applied.
  – widget_rule_typestringType of rule.
  – widget_idstringWidget instance ID if relevant.
  – widget_context_typestringContext entity type.
  – widget_context_datastringAdditional context payload.
  – facetsarrayActive filters on the cart page.
  – product_optionarray of objectsSelected product options per item, each { name, value }.
 – request_idstringUnique identifier
 – page_depthstringCurrent page number (1, 2, 3, etc.).
Example:
// After loading checkout data:
const cart = {
  id: 'CART-789',
  cart_amount: 180.00,
  total_quantity: 1,
  items: [
    {
      sku: 'PROD-001',
      variant_sku: 'PROD-001-BLUE',
      product_category: [{ id: 'apparel', name: 'Apparel', provider_id: 'prov1' }],
      total_value: 129.99,
      quantity: 1,
      mode: 'direct',
      mode_details: {
       search_term: 'jack',
       search_location: 'page',
       search_source: 'search_suggestion',
       used_suggestion: 'jacket',
       category: null,
       collection: null,
       widget_rule: null,
       widget_rule_type: null,
       widget_id: null,
       widget_context_type: 'direct',
       widget_context_data: '',
       request_id: requestId,
       page_depth: currentPage,
       facets: [],
      },
      product_option: [{ name: 'Size', value: 'M' }]
    }
  ]
};


ExpAnalyticsService.trackCheckoutInitiated({
    total_value: cart.cart_amount,
    total_quantity: cart.total_quantity,
    cart_id: cart.id,
    products: cart.items || [],
});