Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixpanel anonymous user converts to identified user tracking

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?

like image 359
Jim Rubenstein Avatar asked May 23 '12 21:05

Jim Rubenstein


People also ask

What does the Mixpanel identify () call actually do?

The primary purpose of calling mixpanel. alias() is to connect a user's anonymous events from before a signup (or other identification) event with the post-signup activity on your site or in your app. You can simply identify existing users with the Mixpanel identify method.

How do I track a new user on Mixpanel?

In order to track a first-time user in Mixpanel, you will need to specify an event and property combination that designates a first time user. In general this would mean you attach a property to an event or set of events when a first-time user performs them.

What is Mixpanel tracking?

What is Mixpanel? Mixpanel is a user analytics tool that allows you to track how users interact with your Internet-connected application. Data is sent from a user's device or your server to Mixpanel, where it can be analyzed in real-time to better identify trends and understand user behavior.

How do I track an event on Mixpanel?

Sending Events Once you have the snippet in your page, you can track an event by calling mixpanel. track with the event name and properties. // Send a "Played song" event to Mixpanel // with a property "genre" mixpanel.


1 Answers

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.

like image 165
loopj Avatar answered Sep 17 '22 11:09

loopj