// After the cart data loads:
const cart = {
id: 'CART-789',
base_amount: 200.00,
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.trackCartViewed({
total_value: cart.cart_amount,
total_quantity: cart.total_quantity,
cart_id: cart.id,
base_amount: cart.base_amount,
cart_amount: cart.cart_amount,
products: cart.items || [],
});