Identify Users
Associate anonymous events with authenticated user profiles.
By default, Helion tracks all visitors anonymously using a device identifier. Calling identify links the current device to a known user profile in your system, enabling per-user analytics, session history, and profile-level segmentation.
Basic identification
Call identify immediately after a user authenticates, passing their stable identifier from your database.
hl.identify({
profileId: 'user_123',
});Attaching profile traits
Include standard traits alongside the profileId to populate the user's profile in the dashboard.
hl.identify({
profileId: 'user_123',
firstName: 'Jane',
lastName: 'Doe',
email: 'jane@example.com',
company: 'Acme Inc',
});Standard trait keys
The following keys are recognized by the Helion dashboard and displayed with dedicated UI treatment. Use them for common user attributes to ensure consistent display across projects.
| Key | Type | Description |
|---|---|---|
firstName | string | First name |
lastName | string | Last name |
email | string | Email address |
phone | string | Phone number |
avatar | string | URL of the user's profile image |
Best practices
- Identify on login: Call
identifyimmediately after authentication completes, not on page load. Anonymous events recorded beforeidentifyare automatically linked to the profile retroactively. - Re-identify on profile updates: If a user changes their name or email, call
identifyagain with the updated values. Helion merges the new traits into the existing profile. - Use stable, opaque identifiers: Use a UUID or integer primary key from your database — not an email address or username that may change.
- Call
clear()on logout: Clears the device-to-profile association so the next visitor does not inherit the previous user's identity.