Identifying visitors
Attach a stable id and traits so profiles carry names instead of anonymous identifiers.
By default every visitor is anonymous. Calling identify() from your site attaches a stable id and any traits you choose, which is what turns the Users list from a list of identifiers into a list of people.
The call
The full API, including trait types and when to call it, is documented under Identify logged-in users. In short: call it once the visitor is known — after login, after signup, after a purchase.
Choosing the id
Use your own stable internal user id. It must not change when the person edits their profile, and it must be the same value across devices — that is what merges their phone and laptop sessions into one profile.
Do not use an email address as the id. People change emails, which silently splits one person into two profiles. Send the email as a trait instead.
Choosing traits
Send what you would want to filter or segment by: plan, role, company, signup date, lifetime value. Skip anything you would not want to see in an analytics tool — Spectry stores traits as sent, so sensitive fields do not belong here. See Privacy masking.
What identifying changes
- Earlier anonymous sessions from the same browser are attached to the profile retrospectively — you keep the pre-signup research path.
- Sessions from other devices join up once identified there too.
- Traits become available as segment filters.
Consent still applies
Identification does not bypass consent. If a visitor has not granted the analytics category, nothing is recorded to identify.