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

rfkid

string

Required.

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.

Default 0.

keyword

string

Required.

Original keyword or search text that user entered in the search box.

modifiedKeyword

string

Required if the response included a modified keyword.

Modified keyword that was returned as part of search response.

context

Context

Required.

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.

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

rfkid

string

Required.

Identifies the Discover widget for which this event is being tracked.

facetType

string

Required.

Type of selected facet.

Example, color.

facetValue

string

Required.

Clicked value in the list of values for the selected facet.

Example, red.

valueIndex

number

Required.

Index of clicked value in the list of values for the selected facet.

facetIndex

number

Required.

Index of the selected facet in the list of facets.

context

Context

Required.

Describes the page and context within which this event is fired.

Do you have some feedback for us?

If you have suggestions for improving this article,