Tracking Search Results Page Views
Search Viewed Event
This event tracks when a shopper performs a search, helping merchants measure engagement.
interface PromoTile {
id: number;
name: string;
link: string;
thumbnail: string;
}
export interface SearchPreformedData {
query: string,
narrowBy?: Narrow[],
sortBy?: SortBy,
products?: string[],
pagenum?: string,
rescount?: string,
promoTiles?: PromotileEvent[]
}
window.FastSimonSDK.event({
eventName: window.FastSimonEventName.SearchPerformed,
data: {
query: "glasses", // (Required)
narrowBy: ["Type","Shirt"],
sortBy: FastSimonSortBy.AtoZ,
products: ["123", "3424", "65656"], // Optional
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).