// Assume these variables are populated from your category response and UI state:
const categoryId = 'cat123';
const categoryName = 'Running Shoes';
const selectedFacets = []; // e.g. [{ field: 'size', value: '10' }]
const requestId = categoryResponse.headers.get('x-request-id');
const currentPage = 1; // Current page number (1, 2, 3, etc.)
const products = [
{ sku: 'RS-001', name: 'Lightweight Runner' },
{ sku: 'RS-002', name: 'Marathon Pro' }
];
ExpAnalyticsService.trackCategoryViewed({
category_id: categoryId,
category_name: categoryName,
sku: products.map(p => p.sku),
used_suggestion: usedSuggestion,
search_source: searchSource,
facets: selectedFacets,
request_id: requestId,
page_depth: currentPage
});