By implementing logout, we will allow multiple users on the same device. Find the below explanation of how you test this feature.
To allow multiple users to use the same device, you need to initialize the SDK with user email ID( if your App doesn’t require user email, please send user mobile number in email filed) and make sure to call “AppVirality.Logout()” method on user logout button click. This would clear the current user session and make it ready for next user who will login to the App. On new user login, please initialize the SDK with user new email.
For example you have two users “email@example.com” and “firstname.lastname@example.org” on different devices. Initialisation should happen on signup with the emailids provided in each device. verify the users in influencers tab under analytics
Now logout of “email@example.com” and login with “firstname.lastname@example.org”. As soon as “email@example.com” logs in ,initialisation should happen again with “firstname.lastname@example.org”. Now you will see two records for email@example.com in dashboard for different devices.Though system generates two different records for user1, both will work as same. If you are seeing multiple records for the same user, that mean user has changed devices by login and logout ie, in both devices you will see same user (Same referral link, referral code and earnings etc).
If you don’t implement “AppVirality.Logout()” method, user sessions will get merged and all the users using the same device will be treated as single user ie,”firstname.lastname@example.org” and “email@example.com” will not be merged and treated as same device.
Now refer “firstname.lastname@example.org” from “email@example.com” (from any one of the devices). If “firstname.lastname@example.org” does any conversion events then rewards distributed to email@example.com will be seen in both the devices.
Now logout of “firstname.lastname@example.org” and login with “email@example.com”. App should initialise with email “firstname.lastname@example.org” and the referral link, referral code and earnings etc in the device will be of email@example.com.