# Event context

Learn about the event context.

An event context provides additional details about the specific circumstances in which a tracked event occurred, and varies based on its environment type:

- **Web context**\
  Channel-specific data from the browser, such as the page URL and a unique tab identifier.

- **Server context**\
  Data related to the backend service that tracks the event.

The fields available in the context object depend on the value of the `type` field.

## Web context

When `type` is `web`, the context object includes the following fields:

- `url`: `string`

  The URL of the page in which the event occurred.

- `tabId`: `string`

  A unique identifier for the tab in UUID format.

  This ID is consistent across page loads and refreshes.

- `timeZone`: `string|null` (optional)

  The time zone of the user's browser, as specified by the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

  For example, `America/New_York` or `America/Sao_Paulo`.

- `metadata`: `Record<string, string>` (optional)

  Additional metadata about the application that tracked the event.

  For example, the application name, screen resolution, or any other relevant information.

## Server context

When `type` is `server`, the context object includes the following fields:

- `metadata`: `Record<string, string>` (optional)

  Additional metadata about the application that tracked the event.

  For example, the application name, screen resolution, or any other relevant information.

## Examples

Below are examples of event contexts:

**Web context**

```json
{
  "type": "web",
  "tabId": "0b032685-0a7e-4cdd-9ff1-9d3af33507a4",
  "url": "https://www.example.com",
  "timeZone": "America/New_York",
  "metadata": {
    "appVersion": "1.2.3"
  }
}
```

**Server context**

```json
{
  "type": "server",
  "metadata": {
    "appVersion": "1.2.3"
  }
}
```

## Explore

- [Analytics](/reference/analytics): Learn how to analyze your dashboards.
- [CQL](/reference/cql/expressions/events/overview): Learn how to create event-based audiences.
