What are cohorts?
Cohorts are identifiers for a session, represented as key-value pairs (e.g.,account_type: paid), that enable you to filter sessions in Adora. Each session can have an unlimited number of cohorts.
Examples of useful cohort data include:
- Experiment flags (e.g.,
new_onboarding_experience = true) - User account data (e.g.,
type = free,type = paid) - User settings (e.g.,
light-mode = dark)
What is captured?
By default, the Adora snippet automatically captures the following:- Country: Inferred from the user’s IP address.
- Language: Determined by the browser’s language setting (
navigator.language). - Browser and device type: Extracted from the user agent.
- User ID: A unique identifier for a user.
- User Cohort: Custom key-value pairs that you define.
adoraStart again with the new
user ID or user cohort.
Overriding the language
If your application’s displayed language is determined by user account settings rather than the browser, you can manually override the language by specifying thelanguage parameter in adoraStart using an ISO 639-1 code (optionally with a country code):
Adding User IDs
To uniquely identify a user, include auid argument in adoraStart:
uid can be either a string or a number.
Adding Custom Cohort Data
Custom cohort data can be added using theuserCohorts field in adoraStart. This field accepts a set of arbitrary string key-value pairs for flexible segmentation.
window object to include adoraStart.
Bypassing sampling
In some cases you may want to bypass sampling and ensure that a session is captured (e.g. if there are a cohort of users that are important to your business). This can be done by passing inbypassSampling: true when adoraStart is called.
Although bypassSampling skips sampling, it is still subject to daily and monthly session caps.