Top
Identify unique users in Whatfix Mobile
  • 26 Aug 2024
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

Identify unique users in Whatfix Mobile

  • Dark
    Light
  • PDF

Article summary

User Identification

If user information (User ID) is not configured, Whatfix Mobile uses the local device storage (cache) to store analytics data like the number of times the element is shown, the number of times the Flow is completed by a user, etc.

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

We recommend using user information like email ID, merchant ID, phone number, etc. 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. This 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, and they see the guidance content as many times as intended by the content creator, even if they share a device, use multiple devices, uninstall the app, or clear the cache.

Your title goes here
To identify users, end users need to log in to the app using their credentials. Whatfix Mobile cannot distinguish users if credentials are shared.
Your title goes here

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 Identification

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")

Objective-C

[[Leap shared] setUniqueUserId:@"UNIQUE_ID_OF_THE_USER"];

React Native

LeapReactNative.setUniqueUserId("UNIQUE_ID_OF_THE_USER");

Ionic

LeapPlugin.setUniqueUserId({uniqueUserId: "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");

Xamarin Android

Leap.SetUniqueUserId("UNIQUE_ID_OF_THE_USER");

Xamarin iOS

Leap.Shared.SetUniqueUserId("UNIQUE_ID_OF_THE_USER");
Clear interaction history
You have to clear the user interactions performed by a particular end user like selecting a language, dismissing a Flow, etc. whenever they log out. This ensures that the interactions are not reused when a new user logs in. Use the following code to clear the interaction history as per your platform:

Android

Leap.logout();

iOS Swift

Leap.shared.logout()

iOS Objective-C

[[Leap shared] logout];

ReactNative

LeapReactNative.logout();

Ionic

LeapPlugin.logout();

Cordova (Android)

cordova.plugins.LeapAndroid.logout();

Cordova (iOS)

cordova.plugins.LeapiOS.logout();

Xamarin Android

Leap.Logout();

Xamarin iOS

Leaps.Shared.Logout();




Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.