- 27 Jun 2025
- 2 Minutes To Read
- Print
- DarkLight
- PDF
Identify unique users in Whatfix Mobile
- Updated On 27 Jun 2025
- 2 Minutes To Read
- Print
- DarkLight
- PDF
User Identification
If user information (User ID) is not configured, Whatfix Mobile uses the local device storage (cache) to store analytics data such as the number of times the element is shown, the number of times the Flow is completed by a user, and more.
The following are a few issues with using the local device storage approach:
Users using a shared device
If a user views Whatfix Mobile content on a particular device and another user uses the same device, then the in-app experience is not shown to the second user.
Users using the app across multiple devices
If a user views Whatfix Mobile content on a particular device and then logs into another device, the in-app experience is shown again.
User uninstalls the app or clears the cache
If the app is reinstalled or the cache is cleared, a user who has already seen Whatfix Mobile content is considered a new user, and the content is shown again.
User switches from Android to iOS (or vice versa)
If a user switches from Android to iOS (or vice versa), then the in-app experience is shown again on the new OS.
User Identifier method
Whatfix recommends using user information such as email ID, merchant ID, phone number, and more, to identify users. Usernames and extra information are considered Personally Identifiable Information (PII) and are therefore encrypted throughout, in transit, and at rest. So anything that is passed as user information or user segmentation is secure.
Once you configure the user information, Whatfix Mobile usage and analytics data are sent from the SDK. This data is mapped against the respective User ID and stored in the Whatfix cloud. Whenever the end user logs in to the app or updates their User ID, the SDK fetches the data associated with the particular user from the cloud. It helps sync the data between the local device storage (cache) and the cloud, hence solving the user identification issues.
User Identification ensures that the end user's usage history is always synced, enabling them to see the guidance content as many times as intended by you, even when sharing a device, using multiple devices, uninstalling the app, or clearing the cache.
Info:
To identify users, end users need to log in to the app using their credentials. Whatfix Mobile cannot distinguish users if credentials are shared.
Note:
The User Identification feature is available only for SDK versions equal to and above the following versions:
Android: 1.8.2
iOS: 1.9.0
React Native (Android and iOS): 1.8.1
Xamarin Android: 1.5.1
Xamarin iOS: 1.5.0
Cordova (Android and iOS): 1.5.0
Ionic: 1.3.0
Set up User Interaction
Use the following code to set up the User ID as per your platform:
Android
Leap.setUniqueUserId("UNIQUE_ID_OF_THE_USER");
Swift
Leap.shared.setUniqueUserid("UNIQUE_ID_OF_THE_USER")
Flutter
LeapAui.setUniqueUserId("UNIQUE_ID_OF_THE_USER");
MAUI
Leap.SetUniqueUserId("adb");
Jetpack
Leap.setUniqueUserId("UNIQUE_ID_OF_THE_USER");
Xamarin (Android)
Leap.SetUniqueUserId("UNIQUE_ID_OF_THE_USER");
Xamarin (iOS)
Leap.Shared.SetUniqueUserId("UNIQUE_ID_OF_THE_USER");
Cordova (Android)
cordova.plugins.LeapAndroid.setUniqueUserId("abc123@gmail.com");
Cordova (iOS)
cordova.plugins.LeapiOS.setUniqueUserId("UNIQUE_ID_OF_THE_USER");
Ionic
LeapPlugin.setUniqueUserId({uniqueUserId: "UNIQUE_ID_OF_THE_USER"})
React Native
LeapReactNative.setUniqueUserId("UNIQUE_ID_OF_THE_USER");
Objective - C
[[Leap shared] setUniqueUserId:@"UNIQUE_ID_OF_THE_USER"];
Clear Interaction History
To ensure that interactions are not reused when a new user logs in, clear the user interactions performed by a particular end user when they log out. These interactions can be selecting a language, dismissing a Flow, and more.
Use the following code to clear the interaction history as per your platform:
Android
Leap.logout();
Swift
Leap.shared.logout()
Flutter
LeapAui.logout();
MAUI
Leap.Logout();
Jetpack
Leap.logout();
Xamarin (Android)
Leap.Logout();
Xamarin (iOS)
Leaps.Shared.Logout();
Cordova (Android)
cordova.plugins.LeapAndroid.logout();
Cordova (iOS)
cordova.plugins.LeapiOS.logout();
Ionic
LeapPlugin.logout();
React Native
LeapReactNative.logout();
Objective - C
[[Leap shared] logout];