Skip to main content

User Identification

Told tracks each unique visitor to your website or app as a SourceAuthor — an identity within a specific source.

How user tracking works

Anonymous users

When a person first visits, the SDK creates a SourceAuthor with a generated anonymousID. This ID is stored locally:

PlatformStorage
WebCookies
AndroidSharedPreferences
iOSKeychain

The anonymous user is recognized on future visits using this stored identifier.

Identified users

When you call the identify function, the SourceAuthor is updated with a userId and custom traits. The userId takes priority over anonymousID for identification.

All activity collected while the user was anonymous is associated with their identified profile.

What is stored per user

FieldDescription
anonymousIDAuto-generated anonymous identifier
userIdCustom ID you provide via identify
nameDisplay name
languageBrowser/device language (e.g., "EN")
deviceTypedesktop, tablet, or phone
osOperating system
versionApp/OS version
customDataKey-value object with any traits you send
nbSessionsNumber of visits (auto-tracked)
dateLastActionTimestamp of last activity
dateLastAnswerTimestamp of last survey response
companiesList of associated companies/groups

Sessions

A session represents a single visit. The session counter (nbSessions) increments automatically. A new session starts after 30 minutes of inactivity.

Reset (logout)

When you call the reset function, a new anonymous SourceAuthor is created with a fresh anonymousID. The previous user's data is preserved separately.

The identify function

Web

told('identify', {
id: 'user_123',
name: 'Jane Doe',
email: '[email protected]',
plan: 'pro'
});

Android (Kotlin)

Told.identify(mapOf(
"id" to "user_123",
"name" to "Jane Doe",
"email" to "[email protected]"
))

iOS (Swift)

Told.identify(properties: [
"id": "user_123",
"name": "Jane Doe",
"email": "[email protected]"
])

Reserved traits

These traits have special handling in Told:

TraitTypeDescription
idStringRequired. Unique user ID — stored as userId on the SourceAuthor
nameStringDisplay name
firstNameStringFirst name (used for name fallback)
lastNameStringLast name (used for name fallback)
emailStringEmail address
usernameStringUsername
phoneStringPhone number
avatarStringAvatar URL
languageStringLanguage code (e.g., "en") — overrides browser detection
websiteStringUser's website URL
descriptionStringBio or description
createdAtDateAccount creation date (ISO-8601)
addressObjectPostal address (city, country, postalCode, state, street)

Any other key-value pairs you pass are stored in customData and can be used for audience targeting.

Hidden fields

You can also pass user data via hidden fields at init time, without calling identify:

told('init', 'SOURCE_ID', {
hidden_fields: { name: 'John', email: '[email protected]', plan: 'pro' }
});

Hidden fields appear in survey reports alongside the respondent's answers.

Import users

Bulk import users from your database:

  1. Go to your source's Audience section
  2. Click Import
  3. Upload a JSON or CSV file

Each entry must include a mandatory id field. You can include a groups field containing a list of group IDs to associate. If a group doesn't exist, it will be created.

Events tracked per user

The SDK automatically sends events for user actions:

EventWhen
IDENTIFYidentify function called
RESETreset function called
START_SESSIONNew session starts
CHANGE_PAGEUser navigates to a new page/screen
ON_CLICKUser clicks an element (if click tracking enabled)
ON_SCROLLUser scrolls (if scroll tracking enabled)
CUSTOM_EVENTaddEvent / trackEvent called
START_SURVEYUser sees a survey
NEW_ANSWERUser answers a question
REACH_ENDUser completes a survey
CLOSE_SURVEYUser closes a survey
SKIPPEDUser skips a survey
START_PRODUCT_TOURUser starts a product tour

Viewing users

All users are visible in the Audience section of your source. You can view individual profiles with their traits, events, answers, and group memberships.