# Identify signed-in users

Track signed-in users across sessions, replays, funnels, and errors. Once identified, all subsequent events from the browser are linked to that user, and the user shows up on the [Users](https://rum.betterstack.com/team/0/users ";_blank") page.

## Identify the current user

Call `betterstack('user', ...)` after sign-in:

```javascript
[label Identify signed-in user]
betterstack('user', {
  id: 'user_123',
  email: 'user@example.com',
  username: 'John Doe',
  plan: 'premium',
});
```

`id`, `email`, and `username` uniquely identify the user. Users are keyed by the first available value of `id`, `email`, and `username`.

You can add arbitrary custom properties, like `plan` in the example above. They're stored alongside the user data.

The association persists for the page session. To clear it at sign-out:

```javascript
[label Clear user at sign-out]
betterstack('user', null);
```

[info]
#### Identifying anonymous users?
Identifying anonymous visitors might lead to extensive data consumption. Identify users only after they sign in.
[/info]

## What identification unlocks

- **Users page:** Identified users appear on [Users](https://rum.betterstack.com/team/0/users ";_blank") with their sessions, errors, location, and attribution data. See [Analyzing users](https://betterstack.com/docs/rum/using-the-product/analyzing-users/).
- **Sessions:** Filter [Sessions](https://rum.betterstack.com/team/0/sessions ";_blank") with the **Signed in users** preset, or search by `user.id` or `user.username`.
- **Session replays:** Replays are linked to the identified user, so you can watch exactly what a specific user experienced.
- **Auto-capture:** With **Auto-capture identified user events** enabled in the Frontend tab, clicks, form submissions, and other interactions are captured automatically for identified users.

## Next steps

- [Identify groups](https://betterstack.com/docs/rum/identify-groups/): track behavior of entire teams or organizations.
- [Analyzing users](https://betterstack.com/docs/rum/using-the-product/analyzing-users/): work with the Users page.
