Events

Sitecore Search JavaScript SDK for React offers many interfaces to track events. This topic lists various events by type and how they are dispatched.

In an implementation using JS SDK for React, the SDK can register most user interaction with your components because the two are coupled. In case of some funnel and global events, the SDK has no way to knowing when they occur. The events have to registered verbosely or by using callbacks.

Events dispatched by JS SDK

The following table lists events that the JS SDK for React dispatches on its own:

Event interface

Event type

trackRecommendationClickEvent

Recommendation event

trackRecommendationClickEntityEvent

Recommendation event

trackPreviewSearchClickEvent

Preview Search event

trackSearchResultsClickEntityEvent

Search Results event

trackSearchResultsFacetClickEvent

Search Results event

trackViewEvent

Global event

Events to be dispatched using callbacks

The following table lists events that you need to dispatch using callbacks.

Event interface

Event type

trackAddEvent

Funnel event

trackRemoveEvent

Funnel event

trackPageViewEvent

Global event

trackEntityPageViewEvent

Global event

trackUserLoginEvent

Global event

Do you have some feedback for us?

If you have suggestions for improving this article,