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.
Argument |
Type |
Description |
Value |
---|---|---|---|
|
string |
Required. Identifies the Discover widget for which this event is being tracked. |
n/a |
|
string |
Required. Identifies the product for which this event is being tracked. |
n/a |
|
integer |
Position or index of the product that was clicked. Indexing starts from 0. Default: 0 |
n/a |
|
string |
Required. Original keyword or search text that the user entered in the search box Default: "" |
n/a |
|
string |
Required. Modified keyword that was returned as part of search response. Default: "" |
n/a |
|
string |
Required. Text of the link that the user hovers over or clicks. Default: "" |
n/a |
|
string |
Required. Type of suggestion link that the user clicks or hovers over. Default: "" |
"TRENDING_CATEGORY", "TRENDING_BRAND", "KEYPHRASE", "CATEGORY", "BRAND" |
|
string |
Required. Where in the widget the user clicked. |
n/a |
|
string |
Required. Event type that is used to identify the event. |
"widget" |
Discover uses keyword
and modifiedKeyword
to compute analytic metrics like search clicks, click revenue, direct order, and other attribution metrics.