Skip to main content

Collection Viewed

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
promo_tiles?: PromoTile[]; // 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
promo_tiles: [
{
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
}
});