Reputation: 156
Hi Im implementing mixpanel for an existing web app with existing signed up users. The normal flow for new users is that I call alias followed by mixpanel.people.set() on sign up to create user profiles. On Login I would only call identify() to link events to an already existing profile.
The problem happens with already pre-mixpanel signed up users. They won’t sign up so mixpanel.people.set() won’t be called and hence all existing signed up users pre-mixpanel won’t have a user profile. The only way I can think of is to check upon login if the user has a user profile in mixpanel and if not call mixpanel.people.set(). Is there a way to check if a user already has a user profile in mixpanel? Alternatively is there a better way to achieve this?
Upvotes: 1
Views: 3594
Reputation: 156
I found the method that solves this: mixpanel.people.set_once - set properties if they don't exist
https://developer.mixpanel.com/docs/javascript-full-api-reference#mixpanel.people.set_once
Upvotes: 4