I wanted to know that is there any way that if a user logs out and then perform any events, than those events should be not linked to the previous logged in user ID without changing the device ID.
I know right now the only solution is to regenerate device ID while logging out, but I wanted to mantain that device ID to know how many unique peoples are using from that device ID.
Best answer by r0bbieWa11aceView original
@shailander ! This is a great question. When using our SDKs, we will always set a default Device ID that allows us to connect the event stream to a user as they interact with your product. When a user logs in on each device we are then able to connect all their engagement data together from their devices for you to have at the user level.
I have provided a screenshot below of a document that will help add more context around this for you.
Does this help answer your question?
@r0bbieWa11ace , thanks for the explanation.
But my problem statement is that, I don’t want amplitude to link non-login state events (userID is null) to the user which was logged in last on the same browser. Currently, Amplitude uses device ID to map the events to the same user based on device ID even when userID is null.
The only solution I can find is to reset the device ID when user logs out so that the events will come as new anonymous user based on the new device ID. But I want to keep track of the same device ID without linking it to last logged in user.
Is there any way we can switch the priority of filtering users from deviceID → userID to just userID, so that if userID is null, amplitude will basically link all the events after that to a new anonymous user based on the same Device ID without linking it to last logged in userID because they share the same device ID.
So, we keep track of users firstly on userID, if not available, then uses device ID to create another user.
Hope I am able to clarify my problem statement. Let me know if any further clarifications is needed or if it is possible ?
PS : my goal is to not track events with userID as null to some user(having userID) sharing the same device ID, without clearing/resetting the device ID when switching from logged in state - logged out state
Either of these will allow you to have maintain the analysis you would like without add complexity to your instrumentation