Search results widget events
Sitecore Discover JS SDK for React offers the following events to track interaction with the search results widget.
trackSearchResultsClickEvent
Tracks the click on a product present on the search results widget.
Argument |
Type |
Description |
---|---|---|
|
string |
Required. Identifies the Discover widget for which this event is being tracked. |
|
string |
SKU of product being seen in detail. |
|
number |
Index of the product in the list of products. Default 0. |
|
string |
Required. Original keyword or search text that user entered in the search box. |
|
string |
Required if the response included a modified keyword. Modified keyword that was returned as part of search response. |
|
Context |
Required. Describes the page and context within which this event is fired. |
Discover uses keyword
and modifiedKeyword
to compute analytic metrics like search clicks, click revenue, direct order, and other attribution metrics.
trackSearchResultsFacetClickEvent
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.
Argument |
Type |
Description |
---|---|---|
|
string |
Required. Identifies the Discover widget for which this event is being tracked. |
|
string |
Required. Type of selected facet. Example, |
|
string |
Required. Clicked value in the list of values for the selected facet. Example, |
|
number |
Required. Index of clicked value in the list of values for the selected facet. |
|
number |
Required. Index of the selected facet in the list of facets. |
|
Context |
Required. Describes the page and context within which this event is fired. |