# Tab visibility changed

Learn how to track when a user switches between tabs.

This event tracks when a user switches between tabs.

> **Automatically tracked**
>
> The SDK automatically tracks this event when a user switches to another tab and back.

## Input properties

This event has no input properties.

## Processed properties

These properties are automatically tracked:

- `tabId`: `string`

  The unique identifier of the tab, which is a random UUID.

- `visibility`: `string`

  The visibility state of the tab.

  These are the possible values:

  | Value     | Description                                                   |
  | --------- | ------------------------------------------------------------- |
  | `visible` | The user switched back to the tab, and it is now visible.     |
  | `hidden`  | The user switched to another tab, and this tab is now hidden. |

## Payload examples

Below are some payload examples for this event:

**Processed payload**

```json
{
  "type": "tabVisibilityChanged",
  "tabId": "b1f9ca15-51f9-4e8d-9e3a-53e234e17687",
  "visibility": "hidden"
}
```

## Explore

- [Analytics](/reference/analytics): Learn how to analyze your dashboards.
- [Event-based audiences](/reference/cql/expressions/events/event-types/page-viewed): Learn how to create audiences based on this event.
