Skip to main content

Identity tracking

Selektable automatically tracks visitors using browser storage. You can optionally associate visitors with known user identities for better analytics and cross-device tracking.

Automatic tracking

The embed script automatically generates and manages: These IDs are automatically included in all widget API calls without any configuration needed.

Identifying known users

When a customer logs into your site, call identify() to associate their visitor ID with their user account:
Parameters: This does three things:
  1. Stores the user ID and traits in the browser
  2. Sends the identity to the Selektable server in the background
  3. Updates all currently open widgets with the new identity

Resetting identity

When a user logs out, reset the identity to generate a new anonymous visitor:
This generates new visitor, session, and anonymous IDs. The previous user association is cleared.

Reading the current identity

Setting a custom visitor ID

If you have your own visitor tracking system, you can override the auto-generated visitor ID:
Only use this if you have a specific reason to manage visitor IDs yourself. The auto-generated IDs work well for most use cases.

Privacy considerations

  • All IDs are generated client-side in the browser
  • No cookies are used
  • Calling Selektable.reset() clears all stored identity data
  • If localStorage is unavailable (e.g., private browsing), ephemeral IDs are generated per page load