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

Sitecore Discover JS SDK for React offers the following events to track interaction with the search results widget.

<details>
<summary><h2>trackSearchResultsClickEvent</h2></summary>

Tracks the click on a product present on the search results widget.

> [!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 |
| --- | --- | --- |
| `rfkid` | string | Required.<br><br>Identifies the Discover widget for which this event is being tracked. |
| `sku` | string | SKU of product being seen in detail. |
| `index` | number | Index of the product in the list of products.<br><br>Default 0. |
| `keyword` | string | Required.<br><br>Original keyword or search text that user entered in the search box. |
| `modifiedKeyword` | string | Required if the response included a modified keyword.<br><br>Modified keyword that was returned as part of search response. |
| `context` | Context | Required.<br><br>Describes the page and context within which this event is fired. |

> [!note]
> Discover uses `keyword` and `modifiedKeyword` to compute analytic metrics like search clicks, click revenue, direct order, and other attribution metrics.

</details>

<details>
<summary><h2>trackSearchResultsFacetClickEvent</h2></summary>

Tracks a facet click. Facet type, value, and index are based on the data received from Discover that has been used to build the UI.

> [!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 |
| --- | --- | --- |
| `rfkid` | string | Required.<br><br>Identifies the Discover widget for which this event is being tracked. |
| `facetType` | string | Required.<br><br>Type of selected facet.<br><br>Example, `color`. |
| `facetValue` | string | Required.<br><br>Clicked value in the list of values for the selected facet.<br><br>Example, `red`. |
| `valueIndex` | number | Required.<br><br>Index of clicked value in the list of values for the selected facet. |
| `facetIndex` | number | Required.<br><br>Index of the selected facet in the list of facets. |
| `context` | Context | Required.<br><br>Describes the page and context within which this event is fired. |

</details>