-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose usePeople parameter to stop automatic creation of People profiles #89
Comments
sure, i'm happy to expose any useful parameter to underlying sdk provides. |
Sam, I'm far from a Mixpanel expert, but according to my best knowledge this, is just an iOS issue, because on iOS Mixpanel uses the device's IFA as the dictinct ID, so Mixpanel recommends calling identify with a randomly generated UUID on reset, which in turn creates anonymous profiles unless you set usePeople:NO. Which is not currently exposed. |
try out version 4.3.1 i will also release 4.4.0 within the hour with updated android/ios libs. |
Hi Sam, it looks good. However, I found a bug in identify, basically the casting to Bool from [arguments objectAtIndex:1] was incorrect. I changed it to BOOL usePeople = [[arguments objectAtIndex:1] boolValue]; and it works now. I submitted a pull request with the fix. Thanks! |
pulled in your commit. more info in pr comment: |
Hi Sam, I would like to raise your attention to a Mixpanel bug in iOS which has already been fixed by the Mixpanel team in their SDK v3.2.0 but hasn't been implemented in your plugin yet. As you know, on iOS Mixpanel uses the iPhone's IFA as the default distinct_id when aliasing new users. However, this has the unintended consequence that if a user logs out from the application and then a new user signs up, the new user's distinct_id will be the same as the first user's because the devices IFA doesn't change. To solve this issue, Mixpanel recommends to generate a random UUID and call identify with it after mixpanel.reset. The problem with this solution is that by default Mixpanel creates anonymous People profiles when identify is called on iOS; thus between logging out and logging back in the events dispatched to mixpanel are seen as coming from an anonymous user whose People profile is created which skews the actual number of users.
I talked to Jared McFarland from the Mixpanel support team regarding this issue and he wrote:
"The Mixpanel SDK automatically tracks the Total App Sessions and Total App Session Length People properties and when those were first added, it did cause People profiles to be automatically created whenever you called identify: so in v3.2.0 we added the option to set usePeople:NO to prevent identify from creating People profiles - https://github.com/mixpanel/mixpanel-iphone/releases/tag/v3.2.0 https://github.com/mixpanel/mixpanel-iphone/blob/master/Mixpanel/Mixpanel.h#L416-L428 Unfortunately, it doesn't look like that Cordova plugin exposes the usePeople parameter so calling identify will flush those automatic App Session People properties."
I was wondering if you could expose the usePeople parameter?
The text was updated successfully, but these errors were encountered: