I'm not sure of the difference between register and people.set?
I'm want to track a signup event. So I need to create a new people profile.
And I'd like the properties associated to this new people to be attached to further other events.
And then if I want to update some user's properties. Which one should I use?
Best answer by michael
Michael here from Mixpanel Support - happy to help!
The mixpanel.register() method is used to create super properties whereas mixpanel.people.set() calls are used to create people properties. The difference is that super properties are stored in the cookie and are sent with every event. Since they are "super" event properties, these values will not be able to be changed once they've been sent with the event. People properties can be updated to reflect the current value.
For example, if a new user had a property of "Plan" where the value is "Free", you could call:
This would send an event property of "Plan":"Free" with that event of Logged In. Now if that user were to upgrade to a Paid plan, you would say:
That second "Logged In" event would have the property value of "Paid" and the first one will still have the property value of "Free". Since you filter by event properties and people properties in Mixpanel's Engagement reports, if you were to filter the "Logged In" event by the people property of "Plan", you'd see both events as "Paid" because that is the current value associated with the distinct_id that was sent with both events. However, if you filtered by the event property of "Plan", you'd see "Free" for the first event and "Paid" for the second event because those were the super property values at the time of the event.
You can use the people properties to filter off of in events, so you should use mixpanel.register() method for any values that might change over time, and the mixpanel.people.set() method for all values that you want to tie to the user. If you update the people properties, you'll lose the previous value and there will not be a history of that value in your project. So depending on your use case, you may want to use the register and people.set() methods together.