I need Mixpanel to forget distinct_id when user logs out.
In iOS app i call reset (https://mixpanel.com/site_media/doctyl/uploads/iPhone-spec/Classes/Mixpanel/index.html#//apple_ref/occ/instm/Mixpanel/reset)
and it works.
I cant find the right call in Android mixpanel documentation, i tried calling clearSuperProperties(), but distinct_id persists.
- Call
.clearSuperProperties()
to remove any Super Properties in local storage. - Set
new_distinct_id = UUID.randomUUID().toString());
- Call
.identify(new_distinct_id)
and.getPeople().identify(new_distinct_id)
This should wipe the device clean for a fresh user that can then register and be aliased to another distinct_id
.
EDIT: The best way to do this with javascript is to delete the cookie. The name of the cookie is mp_{mixpanel_token_id}_mixpanel 🙂
Answer:
Actually there’s a reset() function in the MixpanelAPI class that, according to the doc, does the following : “Clears all distinct_ids, superProperties, and push registrations from persistent storage.”
Hope that helps