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 “firstname.lastname@example.org” and “email@example.com” 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 “firstname.lastname@example.org” and login with “email@example.com”. As soon as “firstname.lastname@example.org” logs in ,initialisation should happen again with “email@example.com”. Now you will see two records for firstname.lastname@example.org 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,”email@example.com” and “firstname.lastname@example.org” will not be merged and treated as same device.
Now refer “email@example.com” from “firstname.lastname@example.org” (from any one of the devices). If “email@example.com” does any conversion events then rewards distributed to firstname.lastname@example.org will be seen in both the devices.
Now logout of “email@example.com” and login with “firstname.lastname@example.org”. App should initialise with email “email@example.com” and the referral link, referral code and earnings etc in the device will be of firstname.lastname@example.org.