How to merge user profiles?

  • 1 April 2021
  • 1 reply

I’d like to set profile properties on an anonymous user during the signup process and then later set a unique ID from our system when the signup process is finished. Is this possible? Right now I am calling `identify()` for the anonymous user and then calling `identify(customId)` when the signup process is finished to merge them. However, I am seeing two profiles in mixpanel and the profile properties from the anon user do not exist on either. 

1 reply

Hi lucasdachman,

Claudia here from Mixpanel’s Solutions Engineering team - thank you for your question!


You can absolutely set people properties on a user profile prior to identifying the user . However, when you do this Mixpanel will not actually set those properties on the anonymous distinct ID; rather, the request will be queued until there is an identify call. Additionally, keep in mind that in order to set people profile properties, you must call mixpanel.identify() and mixpanel.people.set(). (More here).


Here is an example:


In the console of a web page on which I have Mixpanel installed, I’ve reset the distinct ID so that I am an anonymous user. From here, I have tracked an event and subsequently set people properties on the anonymous user.

In the project’s Live View, you can see the event from the anonymous user coming through. 


If I click on Distinct ID hyperlink, however, you can see that the profile properties are not set on the user. 

In Mixpanel you will be able to see the event stream of anonymous users, but they do not technically have profiles, so there are no user profile properties associated with them. 


Once I identify my user, you will see that in addition to the identify call, the people.set() call is actually sent with it: 

Additionally, I can see the identify event come through in Live View.

When I click on the identified user distinct ID, I can see that in addition to merging the anonymous activity with the identified activity, it has appended the profile properties to the user which I set when they were anonymous. 


Hope this helps!