HomeAppVirality DocsTesting GuideTesting Logout

Testing Logout

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 “user1@gmail.com” and “user2@gmail.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 “user2@gmail.com” and login with “user1@gmail.com”. As soon as “user1@gmail.com” logs in ,initialisation should happen again with “user1@gmail.com”. Now you will see two records for user1@gmail.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,”user1@gmail.com” and “user2@gmail.com” will not be merged and treated as same device.



Now refer “user3@gmail.com” from “user1@gmail.com” (from any one of the devices). If “user3@gmail.com” does any conversion events then rewards distributed to user1@gmail.com will be seen in both the devices.

Now logout of “user1@gmail.com” and login with “user2@gmail.com”. App should initialise with email “user2@gmail.com” and the referral link, referral code and earnings etc in the device will be of user2@gmail.com.

Was this article helpful to you? Yes 3 No 7