CallingDocumentation Index
Fetch the complete documentation index at: https://docs.saytics.com/llms.txt
Use this file to discover all available pages before exploring further.
identify() tells Saytics who is performing actions in your app, linking events to a real user account. Until you call identify, events are recorded against an anonymous ID that Saytics generates automatically. Once you identify a user, all subsequent events — and any prior anonymous events in the same session — are associated with that user’s profile.
When to call identify
Callingidentify at the right moments keeps your user data accurate without generating unnecessary API calls.
- After a user logs in — link the session to their existing account
- After a user signs up — create their profile with initial traits like name and email
- When user profile data changes — update traits such as plan tier, company, or role
- Not on every page load — call
identifyonce per session after authentication, not on navigation
Basic identify call
Pass the user’s unique ID as the first argument, followed by an object of traits that describe the user.userId you pass should match the ID from your own database so you can correlate Saytics data with your records.
Reserved traits
Saytics recognizes the following trait names and uses them to populate user profiles in the dashboard. Use these exact keys when sending the corresponding information.| Trait | Type | Description |
|---|---|---|
name | string | Full name |
email | string | Email address |
created_at | ISO 8601 date | Account creation date |
avatar | string (URL) | Profile image URL |
company | string | Company name |
Custom traits
Beyond the reserved traits, you can include any additional key-value pairs that are relevant to your product. Common examples include:plan— the user’s subscription tiermrr— monthly recurring revenue attributed to this userrole— the user’s role within their organizationdepartment— the team or department they belong to
Updating traits
Callingidentify() with new traits merges them into the existing profile. Traits that are not included in the call are left unchanged, so you only need to send the properties that have actually changed.
null or an empty string.
Server-side identify
You can also callidentify from your backend using the Node.js SDK. This is useful when profile changes are driven by server-side events, such as a subscription upgrade processed by your billing system.