Skip to main content

Tracking Collection Page Views

Collection Viewed Event

This event tracks when a Shopper performed navigation to a collection page

interface PromoTile {
id: number;
name: string;
link: string;
thumbnail: string;
}

interface CollectionViewedEventData {
categoryID: string; // Required
query?: string; // Optional
narrowBy?: [string, string][]; // Optional
sortBy?: window.FastSimonSortBy; // Optional
products?: string[]; // Optional
promoTiles?: PromoTile[]; // Optional, should be passed in order to collect data about the promotiles
fromTurboLink?: boolean // Optional
}

// Example of sending a Collection Viewed event
window.FastSimonSDK.event({
eventName: window.FastSimonEventName.SmartCollectionPreformed,
data: {
categoryID: "1231", // Required
query: "summer dresses", // Optional
narrowBy: [["Color", "Red"], ["Size", "M"]], // Optional
sortBy: window.FastSimonSortBy.NewFirst, // Optional
products: ["123", "3424", "65656"], // Optional
fromTurboLink: true , // Optional if came from turbolink
promoTiles: [
{
id: 17289243295695228,
name: "15% Off Promo",
link: "https://www.example.com/promo",
thumbnail: "https://www.example.com/thumbnail.jpg"
},
{
id: 17289243295695229,
name: "Buy 1 Get 1 Free",
link: "https://www.example.com/bogo",
thumbnail: "https://www.example.com/bogo-thumbnail.jpg"
}
] // Optional
}
});

Viewport Impression Tracking

What it is

Record when each product card first becomes visible in the shopper’s viewport. These impression signals feed Fast Simon’s personalization and relevancy engines, improving ranking accuracy and measurement across PLPs and recommendation widgets.

Why it matters

  • Higher-accuracy personalization & re-ranking based on real exposure, not just clicks/purchases.
  • Trustworthy CTR (clicks ÷ impressions) for products and placements.
  • Cleaner A/B tests by distinguishing items that were seen vs. never viewed.
  • Reduced bias between above-the-fold and below-the-fold items.

Example

// Example of tracking viewport impression for a product on its creation
window.FastSimonSDK.trackViewportImpression(productContainer, product.id, index + 1);

Parameters:

  • productContainer: The DOM element of the product card.
  • product.id: The product's unique identifier.
  • index + 1: The product's position in the list (1-based index).