Tracking Collection Page Views
Collection Viewed Event
This event tracks when a Shopper performed navigation to a collection page
interface PromoTile {
promotile:boolean,
id: string, //promotile id
title: string, //promotile title
link?: string, //link redirection to another page
image: string, //image url
mobile_image?:string, //mobile image url
width:number, //1,2
height:number, //1,2
html?:string, //rendering html instead of image
action_type:string,
shopper_assistant_message: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
pagenum?: string,
rescount?: string,
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
}
});
Include sortBy in the event only when the shopper explicitly selected a sort on the page. If no sort was selected (the page used the default sort configured in the Dashboard), omit sortBy so the reported data matches what the shopper actually saw.
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 across PLPs and recommendation widgets.
This reports a grid-level impression, and it is not how a recommendation widget's own impressions are recorded. To report that a recommendation widget was shown, send RecommendationsProductsShown — without it, the widget's impressions and CTR stay empty no matter how many viewport impressions are sent.
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).