Using Mixpanel on the web, new sessions, when user is aliased results in errAliasAlreadyExists

  • 3 December 2021
  • 1 reply

I am integrating a Shopify web site with Mixpanel via Segment (and the Little Data approved Shopify → Segment source). I can see all the events flowing through Segment as I would expect, and when a user goes through checkout, and an email address is provided, an alias call is made to associate the distinctID with the email.

However, if I open up a new session and go through checkout again via that new session, when the alias call is made, Mixpanel errors on the alias with error errAliasAlreadyExists “alias already exists with the id”.

It appears as though trying to provide a new alias of that distinctID to a user that has previously been aliased fails. Is there any way to avoid this? Ideally any distinct ID that I alias to a known user ID or email should cause the events pre-alias to merge with the identified user.

But from what I’m seeing, the alias only works once. Am I doing something wrong?


Best answer by alon 10 December 2021, 09:02

View original

1 reply

Badge +1


From looking at Segment’s documentation you have two alternatives from what I see to solve this issue.

Either use flush or reset cookies.