Identify users
Bind anonymous sessions to the user accounts you already know. The SDK automatically stitches prior activity to the identified user — no manual session merging needed.
01Basic identification
One call on login is all you need.
Call identify() on login
Use any stable identifier from your system — user ID, email, or internal account reference.
window.Sumidata = window.Sumidata || {
push(m, a) { (this.q = this.q || []).push([m, a]) }
}
Sumidata.push('identify', ['user_7e2a9c'])Pass optional traits
Any fields you add become queryable in the AI Analyst and filterable in dashboards.
Sumidata.push('identify', ['user_7e2a9c', {
email: 'lin@arcadia.io',
plan: 'team',
createdAt: '2026-02-14'
}])02Handling logout
When the user logs out, clear the identity so the next session starts anonymous.
// on logout
Sumidata.push('logout', [])identify() is called with a different user ID than the current session, Sumidata automatically closes the current session and starts a new one — no history bleed between accounts.03Privacy notes
PII-sensitive traits are masked at ingest by default.
Common PII fields (email, phone, full name) are auto-masked in session replays. The traits themselves are stored in structured form and queryable in the Analyst — but never leak into visual replays.
You can opt out of storing a trait entirely by omitting it from the identify() call. The SDK never captures anything you don't pass explicitly.
