If the Recommendations product was enabled for the current page, you can request that additional product attributes (such as star ratings) are supplied in the smartRecs callback.
Name | Description | Usage | |
---|---|---|---|
smartRecs |
|||
showAttributes | Controls which attributes to show in the smartRecs callback |
[Optional] |
|
markRecsAsShown | Whether all recommendations sent as the response are rendered. |
[Optional] This must be included if a subset of recommendations sent as the response is rendered on the front end of your site/application. Default is true; that is, all recommendations in the response are assumed to have been rendered. If set to false, an additional API call needs to be made to inform Episerver of the IDs of recommendations that have been rendered. See Impression tracking. |
For example, on a product page tracking request, to show all attributes for the recommended products, send the following.
<script>
PeeriusCallbacks.track={
type:"product",
lang:"en-gb",
"smartRecs": {
"showAttributes": ["*"]
},
product: {
refCode:"PROD500"
}
}
</script>
If you want the callback to contain only the attribute "starrating", for each recommended product, send the following.
<script>
PeeriusCallbacks.track={
type:"product",
lang:"en-gb",
"smartRecs": {
"showAttributes": ["starrating"]
},
product: {
refCode:"PROD500"
}
}
</script>
Last updated: May 23, 2018