- 07 Mar 2023
- 4 Minutes To Read
Identify unique users in Whatfix Analytics
- Updated On 07 Mar 2023
- 4 Minutes To Read
Identifying users on the Web is a challenging task. Whatfix uses a combination of parameters to uniquely identify a user. These parameters include setting browser cookies on the user’s browser and passing the user information (when available) back to Whatfix.
Whatfix provides an API to accurately set and pass the user information. However, if the user information is not configured, then we use browser local storage and cookies to identify a user. While the second approach doesn’t involve as much configuration as the first, there are a few issues with using cookies:
- The same user when using different browsers/machines is counted again.
- Users who clear cookies or browse using in-private sessions are counted again.
- Users who are inactive for more than 3 months are counted again as browser cookies are set to expire after an inactivity of 3 months.
User Identifier Method
We recommend using user information so that we can correctly identify users and provide more accurate analytics. User information can be set using wfx_settings. This can also be used along with the extra values to segment user behavior.
Usernames and extra information are considered Personally Identifiable Information (PII) and therefore is encrypted throughout - in transit and on rest. So anything that is passed as user information or user segmentation information is secure. For more detailed information, contact Whatfix Support at firstname.lastname@example.org.
For more detailed information, contact Whatfix Support at email@example.com.
Browser Local Storage
Data stored in local storage are completely encrypted.
When Whatfix is loaded on a page, we also set a cookie to identify the user. This is a random value generated every time we set it. The value of this cookie is passed with every call sent to analytics along with the user information above.
Certain things to note about cookies:
Cookies automatically expire after 3 months
The name of the cookie is wfx_unq
The value of the cookie is randomly generated
Whatfix stores the value of wfx_unq in your browser local storage.
Once wfx_unq expires, after 3 months, Whatfix searches for the value in your browser local storage. If Whatfix finds it, it assigns the cookie value which is present in your browser local storage to wfx_unq rather than generating a new value.
To generate a new value for wfx_unq, you have to clear the value from your browser local storage and the cookie.
How do we identify users
Whatfix uses a combination of cookies set in the browser and the user API to identify a user. We first try to use user information if it’s present. For events where user information is not available, we rely on the value of the unique cookie set in the event.
A single person using multiple devices with user information set in most of them
Let’s assume that a user (John) is logged in on his desktop, a mobile device, and another device. User information is available on the first two devices but not on the third.
|Device||Is User Info Present||Unique Cookie Value||User info resolved|
|Unique Users Detected||3||2|
Whatfix was able to retrieve and use the username in the first two devices. However, in the third device, we do not know who the user is, and so we fall back to the unique cookie value.
The number of users detected by our algorithm is 2.
In case no user information is passed for the same example, the number of unique users detected completely relies on cookies and therefore is recorded as 3
If user information is set in all the calls, then the user detected is 1.
Every time Whatfix loads on a browser, it looks up the unique cookie. If absent, a unique ID is generated and saved as a cookie. Subsequent sessions use the same cookie value to identify the user. This user ID is sent in all Analytics events. Whatfix has an improved method to identify users accurately. As a result, for end users on the Extension deployment method you may now see a decrease in the user count. The new method identifies a single user as a unique user even if they are using multiple unique cookie IDs. Thus the user count is more accurate and may show a decline from prior reports.
Earlier a single user with multiple unique cookie IDs was identified as different users resulting in counting the same user more than once.
Whatfix has an improved method to identify users accurately. As a result, for end users on the Extension deployment method you may now see a decrease in the user count.
The new method identifies a single user as a unique user even if they are using multiple unique cookie IDs. Thus the user count is more accurate and may show a decline from prior reports.