Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
99
rated 0 times [  103] [ 4]  / answers: 1 / hits: 15611  / 12 Years ago, wed, may 23, 2012, 12:00:00

I'm adding Mixpanel to my web application and I'm curious about the process around what happens when a user transitions from anonymous (not logged in/registered) to identified (when they register / create an account on the site).



If a user comes in and is new to the site, they get an anonymous UUID (according to the documentation). The documentation also says that Mixpanel can not translate between IDs at this time.



Does this mean Mixpanel is incapable of handling the transition of a non-registered user to a registered user, and keep track of their events from before they became a registered/identified user?



If so, does anyone have experience with working around this? How'd you go about it?


More From » cookies

 Answers
49

As of December 2012, you can now use the mixpanel.alias method call to alias two ids:



https://mixpanel.com/docs/integration-libraries/using-mixpanel-alias



From the above docs:




John comes to your website, example.com, for the first time. He is
assigned a randomly generated ID (perhaps 123123) by Mixpanel.
Everything he does is associated with that ID.



After clicking through a few pages, he successfully signs up. On the
signup confirmation page, you call mixpanel.alias([email protected]).
This doesn't actually change his ID - he is still being identified
using the random ID we originally assigned him.



What it does do is add the ID [email protected] to a lookup table on
our end. Whenever we see data for [email protected], we know to remap
it to 123123, his original ID.



So, you can start calling mixpanel.identify([email protected]) on all
your pages, and your events, funnels, and retention will all continue
to work perfectly.



[#85388] Tuesday, May 22, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
loganl

Total Points: 424
Total Questions: 86
Total Answers: 112

Location: Zimbabwe
Member since Thu, Jul 21, 2022
2 Years ago
;