Skip to main content
Call identify as soon as you know who the user is: after sign-in, and on every launch where a user is already signed in. Use your own stable user id, the one your backend uses. It is how you find a user in the dashboard, target a broadcast, and run lookups against your database. Calling it again with the same id does nothing, so you don’t need to track whether you already called it.

Events before sign-in

The SDK tracks a device from first launch. When you identify it, events that device already sent are attributed to the user too, so a user’s history starts at install, not at sign-in.

Signing out

When a user signs out, call reset() on the client so the next user’s events and metadata aren’t attributed to the previous one:
Then call identify again when the next user signs in.

User metadata

Metadata is what you know about a user that their events don’t show: plan, cohort, signup date. Send it with identify, or on its own:
Metadata keeps its type. 14 is stored as a number and "14" as a string, and they are not the same value. Limits, enforced by the server: