Solved

Handling multiple ditinct IDs

  • 11 February 2019
  • 2 replies
  • 74 views

Userlevel 2
Badge

We have an application which have a Java backend and Angular frontend. The backend sends an invitation email for which an event is sent to Mixpanel (event : Notification Sent) using the mixpanel-api Java library. The user clicks on the invitation link and lands on the frontend (event: Invitation Accepted) and signs up (event: Sign Up) using the Mixpanel Javascript library.

Now there are 2 distinct_ids created, one from the backend and other one from the frontend.

How to merge these 2 distinct_ids?

I tried using mixpanel.alias and mixpanel.identify, but it still shows 2 different users on Mixpanel.


icon

Best answer by dstuecken 13 February 2019, 18:24

Alias should be the way to go, how do you currently use alias?

According to https://help.mixpanel.com/hc/en-us/articles/115004497803 your java backend should alias the email address it is sending the confirmation to. After signup you would identify the user using the email address again.


View original

2 replies

Badge

Alias should be the way to go, how do you currently use alias?

According to https://help.mixpanel.com/hc/en-us/articles/115004497803 your java backend should alias the email address it is sending the confirmation to. After signup you would identify the user using the email address again.


Userlevel 2
Badge

Thanks dstuecken for the answer.

Actually the thing that worked for us was that we are calling the alias on the landing page on the frontend with the distinctId created on the Java backend and then calling the identify with the userId after signup, also replace the distinctId with the new userId using alias.


Reply