1. JS SDK reference

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 interfaceEvent type
trackRecommendationClickEventRecommendation event
trackRecommendationClickEntityEventRecommendation event
trackPreviewSearchClickEventPreview Search event
trackSearchResultsClickEntityEventSearch Results event
trackSearchResultsFacetClickEventSearch Results event
trackViewEventGlobal event

Events to be dispatched using callbacks

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

Event interfaceEvent type
trackAddEventFunnel event
trackRemoveEventFunnel event
trackPageViewEventGlobal event
trackEntityPageViewEventGlobal event
trackUserLoginEventGlobal event
If you have suggestions for improving this article, let us know!