// Assume these variables are populated from your collection response and UI state:
const collectionId = 'cat123';
const collectionName = 'Running Shoes';
const selectedFacets = []; // e.g. [{ field: 'size', value: '10' }]
const requestId = collectionResponse.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.trackCollectionViewed({
collection_id: collectionId,
collection_name: collectionName,
sku: products.map(p => p.sku),
facets: selectedFacets,
request_id: requestId,
page_depth: currentPage
});