Global events
Sitecore Discover JS SDK for React offers the following events to track visits, views, and logins.
trackUserLoginEvent
Sent when a user logs in to the page.
|
Argument |
Type |
Description |
|---|---|---|
|
user |
UserEventModel |
Required. Describes the user. |
|
context |
Context |
Required. Describes the page and context within which this event is dispatched. |
trackAppearEvent
Tracks the appearance of a widget on the page. All the widgets inherit this behavior.
|
Argument |
Type |
Description |
|---|---|---|
|
|
string |
Required. Identifies the Discover widget for which this event is being tracked. |
|
|
Context |
Required. Describes the page and context within which this event is dispatched. |
trackPageViewEvent
Tracks a visit on a page.
|
Argument |
Type |
Description |
|---|---|---|
|
|
Context |
Required. Describes the page and context within which this event is dispatched. |