// After order confirmation:
const order = {
totalValue: 250.00,
total_quantity: 2,
cart_id: 'CART-789',
order_id: 'ORDER-456',
currency_code: 'USD',
total_ex_tax: 230.00,
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.trackCheckoutCompleted({
total_value: order.totalValue,
total_quantity: order.total_quantity,
order_id: order.order_id,
cart_id: order.cart_id,
currency_code: order.currency_code,
total_ex_tax: order.total_ex_tax,
products: order.items || [],
});