How to clear unique_id in mixpanel android when user logs out?

I need Mixpanel to forget distinct_id when the user logs out. In an 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 can’t find the correct call in the Android mix documentation, I tried calling clearSuperProperties (), but clear_id is not saved.

+8
java android mixpanel
source share
2 answers
  • 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 erase the device for a new user, who can then register and be an alias for another distinct_id .

EDIT: The best way to do this with javascript is to delete the cookie. Cookie Name: mp_ {mixpanel_token_id} _mixpanel :)

+5
source share

In fact, there is a reset () function in the MixpanelAPI class, which, according to the document, performs the following actions: "Clears all individual data, superProperties and blocks registration from persistent storage." Hope that helps

+4
source share

All Articles