+Mixpanel introduced identity merge which allows you to call `.identify(SOME_USER_ID)` and Mixpanel will then merge the profiles for the id you pass in, in this case, `SOME_USER_ID`, and the anonymous id of the user prior to identification. This scenario is currently supported by this library. However, signing out causes some issues. This is because on signout Mixpanel recommends calling `.reset()` to get a new anonymous id for the current user. In this implementation, when we call `.reset()` we immediately call `.identify()` with a newly generated id, for ease-of-use. With calling `.identify()` on `.reset()` we are implicitly merging the newly generated id with the anonymous id. This causes problems because identity merge will not work on anonymous ids that have been already merged.
0 commit comments