Signups are closed. We're building something great. Talk soon.

Identify Users

Link events to known users with sessionvision.identify(). Before identification, events are tracked with an anonymous ID. After calling identify, all future events include both the anonymous ID and the user ID.

Basic Usage

sessionvision.identify('user_123', {
  email: '[email protected]',
  name: 'Jane Smith',
  plan: 'pro',
});

The first argument is the user ID (string). The second argument is an optional traits object — use it to attach profile data like email, name, or plan.

Forward-only Linking

Identification is forward-only. When you call identify(), all future events are linked to that user ID. Past anonymous events are not retroactively linked. Call identify as early as possible (e.g. right after login) to maximize coverage.

Reset on Logout

Call reset() when a user logs out. This clears the user ID, generates a new anonymous ID, starts a new session, and clears all registered properties.

// On logout
sessionvision.reset();

Get Current Identity

const id = sessionvision.getDistinctId();
// Returns userId if identified, anonymousId otherwise

Storage

Identity data is persisted in localStorage so it survives page reloads:

KeyPurpose
sessionvision_anonymous_idAnonymous visitor ID (UUID v4)
sessionvision_user_idIdentified user ID
sessionvision_sessionCurrent session data
sessionvision_registeredRegistered properties
sessionvision_registered_onceRegister-once properties
sessionvision_configCached remote config (1hr TTL)

Privacy

PII in auto-captured element text is automatically masked using pattern detection. Emails, phone numbers, credit card numbers, and SSNs are replaced with placeholders like [EMAIL], [PHONE XXX-XXX-XXXX], and [CARD XXXX].