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

rfkId

string

Required.

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

context

Context

Required.

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

trackPageViewEvent

Tracks a visit on a page.

Argument

Type

Description

context

Context

Required.

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

Do you have some feedback for us?

If you have suggestions for improving this article,