1. Qonversion User ID
Qonversion creates a unique User ID each time an app is installed and opened for the first time. To use Qonversion User ID, call the userInfo method. You can use Qonversion User ID for third-party integrations or other purposes like matching data from webhook notifications to your server.2. User ID for third-party Integrations
Qonversion SDK provides an asynchronous method to set your user ID, which will later be sent to third-party integrations you enabled.3. User Identity
User Identity allows cross-device & cross-platform user identification and access management. User identification is critical in building cross-platform apps where you want to manage user access based on payments across different platforms. This can be a complex task as users can log in and out of your application, use multiple devices, or reinstall the app. To provide flexible subscription infrastructure and consistent data, we have built a comprehensive solution using a combination of Qonversion IDs, your backend IDs, and the merging concept for users. Qonversion lets you identify your signed-in users and unlock premium access across multiple devices. Use theidentify() method to link a user to your signed-in subscriber. Call this method every time you want to use User Identity. For example, when a user logs in. User Identity provides a convenient way of managing premium access of your existing subscribers, including the following cases:
- A user reinstalls your app for any reason. Using the same User ID allows you to provide premium access linked to previously purchased products.
- A user logs in on several devices. You can provide premium access based on a subscription purchased on one of his devices.
- A user logs in on iOS and Android versions of your app. You can provide premium access based on a subscription purchased on one of the platforms.
Logging in
When a user logs into his account, callidentify().
Logging out
You need to call thelogout() method to handle entitlements for an unauthorized user. Call this method when a user logs out within your app:
identify() method again.
Examples
Let’s look at the following examples to understand betterQonversion.identify().
Example 1. No User Identity.
Two anonymous users install the app using separate devices and subscribe without using theidentify() method. These users have not been linked to each other.
Now let’s look at the
identify() way of usage.
Example 2. Single User Identity for two separate devices.
Let’s consider the following user flow:- A user installs the app on his iPhone (first device).
- He installs the same app on his second device (iPad/Android device/etc).
- He makes a purchase and creates an account on the second device.
- He uses the same credentials to log into the app on his iPhone (first device).
In this case, Qonversion will provide users
A and B the same entitlements while they use the same user_id_1.
Example 3. One anonymous user logs in & logs out.
Let’s consider the following user flow:- A user installs the app and subscribes to the product
X. - He creates his user account in the app with the following ID:
user_id_1. - Then he purchases the product
Yusing the same app store account. - The user logs out from the app.
X and Y since the purchases were made using the same app store account.
Example 4. Two different anonymous users log in & Log out.
Let’s consider the following user flow:- User
Ainstalls the app and subscribes for the productX. - User
Alogs intouser_id_1account. - User
Apurchases productY. Now UserAhas both entitlementsXandYgranted. - User
Binstalls the app and logs in withuser_id_1credentials. Based on the User’s Identity details, he also can use the app considering entitlementsXandYare granted. - User
Alogs out using thelogout()method, he still has entitlements granted based on both purchases he has made on the device. - User
Blogs out and loses all the entitlements. His anonymous account has no purchases associated with him, as no purchases were made on his device.- It is worth mentioning, in this case, User
Aand UserBhave different store accounts on their devices.
- It is worth mentioning, in this case, User
Example 5. Two accounts with two separate purchases.
Let’s consider the following user flow:- User
Aand UserBinstall the app using separate devices.- User
Aand UserBhave different store accounts on their devices.
- User
- User
Asubscribes to productX - User
Bsubscribes to productY. - User
Athen logs in with the IDuser_id_1for the very first time. At this moment, this user ID is created and EntitlementXattaches to theuser_id_1User Identity. - User
Blogs in with the same IDuser_id_1. - User
Bnow has EntitlementX(based on the User Identity) on top of EntitlementY. - User
Alogs out, he still has EntitlementX(based on the device purchases). - User
Blogs out, he loses EntitlementXbut still has EntitlementY(based on the device purchases).
Example 6. Two accounts log in using the same device with one active purchase.
Activate this behaviour in entitlements
For enabling this feature, navigate to the entitlements settings section and modify the coping strategy setting to “Transfer entitlement.” Read more here- User
Ainstalls the app on his iOS device and subscribes for the productX. - User
Alogs intouser_id_1account. Now Identity useruser_id_1has EntitlementX - User
A'installs the app on his Android device and logs intouser_id_1account. Now UserA'can get access to the EntitlementX- based content on his Android device. - User
Btakes UserA’s iOS device and logs him out from the app. - User
Blogs intouser_id_2account and restores subscription. Now Identity useruser_id_1stops having EntitlementX, as it has been transferred to Identity useruser_id_2 - User
Abeing logged in his Android device withuser_id_1account stops having access to the EntitlementX- based content. Now only Identity useruser_id_2is entitled to it.
Offline SDK mode Restore behavior