Skip to main content

Tracking Search Results Page Views

Search Viewed Event

This event tracks when a shopper performs a search, helping merchants measure engagement.

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
}

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
}
});
sortBy reflects the shopper's selected sort

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.

note

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).