---
title: "Global events"
slug: "global-events"
abstract: "List of global or generic events offered by Sitecore Discover JS SDK for React to track user interaction."
---
# Global events

Sitecore Discover JS SDK for React offers the following events to track visits, views, and logins.

<details>
<summary><h2>trackUserLoginEvent</h2></summary>

Sent when a user logs in to the page.

> [!note]
> Dispatch this event verbosely because the SDK cannot infer when this action is happening.

| Argument | Type | Description |
| --- | --- | --- |
| user | UserEventModel | Required.<br><br>Describes the user. |
| context | Context | Required.<br><br>Describes the page and context within which this event is dispatched. |

</details>

<details>
<summary><h2>trackAppearEvent</h2></summary>

Tracks the appearance of a widget on the page. All the widgets inherit this behavior.

> [!note]
> Dispatch this event verbosely if you are not using Discover UI components.
>
> When hooked through the JS SDK, Discover UI components handle most user interactions and dispatch events automatically.

| Argument | Type | Description |
| --- | --- | --- |
| `rfkId` | string | Required.<br><br>Identifies the Discover widget for which this event is being tracked. |
| `context` | Context | Required.<br><br>Describes the page and context within which this event is dispatched. |

</details>

<details>
<summary><h2>trackPageViewEvent</h2></summary>

Tracks a visit on a page.

> [!note]
> Dispatch this event verbosely if you are not using Discover UI components.
>
> When hooked through the JS SDK, Discover UI components handle most user interactions and dispatch events automatically.

| Argument | Type | Description |
| --- | --- | --- |
| `context` | Context | Required.<br><br>Describes the page and context within which this event is dispatched. |

</details>