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

rfkid

string

Required.

Identifies the Discover widget for which this event is being tracked.

n/a

sku

string

Required.

SKU of the product the user clicked in a widget.

Default "".

n/a

index

integer

Required.

Position of the product or link that the user clicked in a widget. Indexing starts at 0.

Default 0.

n/a

arrow

string

Optional.

Used to paginate through list of recommendations.

"NEXT",

"PREVIOUS"

context

Context

Optional.

Describes the page and context within which this event is fired.

n/a

Do you have some feedback for us?

If you have suggestions for improving this article,