fix: Split out logout function from onUserIdentified#45
Merged
Conversation
5218ee3 to
a4a7bfd
Compare
rmi22186
approved these changes
Oct 27, 2023
rmi22186
requested changes
Oct 30, 2023
rmi22186
left a comment
Collaborator
There was a problem hiding this comment.
Mostly changes to comments to clarify further. Some requests in the tests to include MPID as a test option. It wouldn't need to be in the array/for each, and could be its standalone test.
Co-authored-by: Robert Ing <ring@mparticle.com>
Co-authored-by: Robert Ing <ring@mparticle.com>
rmi22186
reviewed
Oct 31, 2023
Co-authored-by: Robert Ing <ring@mparticle.com>
rmi22186
approved these changes
Oct 31, 2023
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 31, 2023
## [2.1.1](v2.1.0...v2.1.1) (2023-10-31) ### Bug Fixes * Split out logout function from onUserIdentified ([#45](#45)) ([391517d](391517d))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Instructions
developmentSummary
device_idto denote an anonymous user and auser_idfor known users, and a third,distinct_idto bridge the gap.identifyfunction as part of our Identify Request Callback. Mixpanel treats this MPID as the user'suser_id, linking it with the user'sdevice_id, and associates future events with the anonymous MPID as Mixpanel'sdistinct_id.user_id, but Mixpanel generates an error$anon_distinct_id didn't match expected GUID patternand does not associate future events with the previoususer_id.device_idto track anonymous events.user_idthat is known, allowing Mixpanel to correctly merge the profiles.resetmethod tied to mParticle's logout method, so that if a user formally logs out, their session is logged out via Mixpanel as per their requirements.reset()on logout, so we are splittinglogoutfrom the other Identity methods so thatlogoutproperly triggers areset().Testing Plan
MPIDas the External Identity TypeReference Issue (For mParticle employees only. Ignore if you are an outside contributor)