Solved

Log Out and Anonymous Users

  • 2 June 2022
  • 1 reply
  • 79 views

Badge

Hi All, 

I have a question regarding the Log out the user we want to log events under an anonymous user. 

Based on the explanation below, could you please let me know what will happen to Amplitude ID? As Amplitude ID is used to count unique users, I am bit worried that some users will be counted twice. 

“Log Out and Anonymous Users

A user's data will be merged on the backend so that any events up to that point from the same browser will be tracked under the same user. If a user logs out or you want to log the events under an anonymous user, you will need to:

  1. Set the userId to null.

  2. Regenerate a new deviceId.

After doing that, events coming from the current user/device will appear as a brand new user in Amplitude. Note: If you choose to do this, you will not be able to see that the two users were using the same device.”

Thanks. 
Mateja 

icon

Best answer by Denis Holmes 3 June 2022, 12:13

View original

1 reply

Userlevel 6
Badge +8

Hi @Mateja Tomek ,

 

So if you have some User who has the User ID of A and Amplitude ID of 123, and they log some events, they will all be tied to their Amplitude ID of 123, User ID A. If this user just logs out, all the events will have just the Amplitude ID of 123, but since the device ID is the same, it will still be tied to this user with the Amplitude ID of 123, just the User ID will not propagate for the events. However, if they log out AND change their device ID, then a new anonymous user will be generated with a new Amplitude ID because the device ID has changed and there is no User ID set. 
I would also recommend reading this article to help you! :)

 

KInd Regards,
Denis 

Reply