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

Sitecore Discover JS SDK for React offers the event to track interaction with the preview search widget.

## trackPreviewSearchClick

Tracks the click on a product in the preview search container. Fire this event only if you are not using the JS SDK for React UI components.

> [!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 | Value |
| --- | --- | --- | --- |
| `rfkid` | string | Required.<br><br>Identifies the Discover widget for which this event is being tracked. | n/a |
| `sku` | string | Required.<br><br>Identifies the product for which this event is being tracked. | n/a |
| `index` | integer | Position or index of the product that was clicked. Indexing starts from 0.<br><br>Default: 0 | n/a |
| `keyword` | string | Required.<br><br>Original keyword or search text that the user entered in the search box<br><br>Default: "" | n/a |
| `modifiedKeyword` | string | Required.<br><br>Modified keyword that was returned as part of search response.<br><br>Default: "" | n/a |
| `text` | string | Required.<br><br>Text of the link that the user hovers over or clicks.<br><br>Default: "" | n/a |
| `targetObjectType` | string | Required.<br><br>Type of suggestion link that the user clicks or hovers over.<br><br>Default: "" | "TRENDING_CATEGORY", "TRENDING_BRAND", "KEYPHRASE", "CATEGORY", "BRAND" |
| `w` | string | Required.<br><br>Where in the widget the user clicked. | n/a |
| `type` | string | Required.<br><br>Event type that is used to identify the event. | "widget" |

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