---
title: "Recommendation widget events"
slug: "recommendation-widget-events"
abstract: "Describes the event offered by Sitecore Discover JS SDK for React to track user interaction with recommendation widgets."
---
# Recommendation widget events

Sitecore Discover JS SDK for React offers the following event to track interaction with the recommendation widget.

<details>
<summary><h2>trackRecommendationClick</h2></summary>

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*.

> [!note]
> Dispatch this event verbosely if you are not using Discover UI components.
>
> When hooked through the JS SDK, Discover UI components handle most user interactions and dispatch events automatically.

| Argument | Type | Description | Values |
| --- | --- | --- | --- |
| `rfkid` | string | Required.<br><br>Identifies the Discover widget for which this event is being tracked. | n/a |
| `sku` | string | Required.<br><br>SKU of the product the user clicked in a widget.<br><br>Default "". | n/a |
| `index` | integer | Required.<br><br>Position of the product or link that the user clicked in a widget. Indexing starts at 0.<br><br>Default 0. | n/a |
| `arrow` | string | Optional.<br><br>Used to paginate through list of recommendations. | "NEXT",<br><br>"PREVIOUS" |
| `context` | Context | Optional.<br><br>Describes the page and context within which this event is fired. | n/a |

</details>