Recommendation widget events
Sitecore Discover JS SDK for React offers the following event to track interaction with the recommendation widget.
trackRecommendationClick
Tracks the click on a product present on the recommendation widget. Instead of the onNavigationNext
and onNavigationPrev
actions of the UI component, set the arrow
argument to indicate NEXT or PREVIOUS.
Argument |
Type |
Description |
Values |
---|---|---|---|
|
string |
Required. Identifies the Discover widget for which this event is being tracked. |
n/a |
|
string |
Required. SKU of the product the user clicked in a widget. Default "". |
n/a |
|
integer |
Required. Position of the product or link that the user clicked in a widget. Indexing starts at 0. Default 0. |
n/a |
|
string |
Optional. Used to paginate through list of recommendations. |
"NEXT", "PREVIOUS" |
|
Context |
Optional. Describes the page and context within which this event is fired. |
n/a |