Documentation Index
Fetch the complete documentation index at: https://docs.selektable.com/llms.txt
Use this file to discover all available pages before exploring further.
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:| ID | Storage | Scope | Description |
|---|---|---|---|
| Visitor ID | localStorage | Persistent | Unique identifier for the browser, survives tab closes |
| Session ID | sessionStorage | Tab/session | Resets when the tab is closed |
| Anonymous ID | localStorage | Persistent | Initially same as visitor ID, preserved after identify() |
Identifying known users
When a customer logs into your site, callidentify() to associate their visitor ID with their user account:
| Parameter | Type | Description |
|---|---|---|
userId | string | Your system’s user ID |
traits | object | Optional key-value metadata (name, email, etc.) |
- Stores the user ID and traits in the browser
- Sends the identity to the Selektable server in the background
- 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: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:Privacy considerations
- All IDs are generated client-side in the browser
- No cookies are used
- Calling
Selektable.reset()clears all stored identity data - If
localStorageis unavailable (e.g., private browsing), ephemeral IDs are generated per page load