What should I do when users log out?

mixpanel

Solution

It was released on Mixpanel Javascript version v2.8.0 the `mixpanel.reset()` function, so that's officially what should be called on user logout. See https://github.com/mixpanel/mixpanel-js/issues/67 .

Problem

I am setting Mixpanel up, and I found out that if I log in with a user (and `identify` that user), log out and then re-register as a new user, the new user's details overwrite the previously logged in user (presumably when I call `alias`). How can I tell mixpanel that a user has logged out and to reset the identity token (make it anonymous again)?

Original source