On the product detail page I am about to show similar products but not the same all the time (the recommendation is personalised). If particular recommendation is constantly being ignored or just quickly viewed (I see page ping as useful for this case) then I want to negatively boost that recommendation and favourise the others.
I think it would be better to use context as the list of the itemId
s of the recommended products present on the page. It would be added to the trackPageView
event.
Roughly it could look like this
window.snowplow(
'trackPageView',
// no custom title
null,
// List of itemIds shown on the page
[{
schema: 'iglu:com.acme/product_shown/jsonschema/1-0-0',
data: {
itemId: 'ABC123'
}
},
{
schema: 'iglu:com.acme/product_shown/jsonschema/1-0-0',
data: {
itemId: 'DEF456'
}
}]
);