Mixpanel helps you to be GDPR compliant. You can now disable and enable tracking at runtime by using new APIs we have written for you:
Mixpanel.mainInstance().optOutTracking()
- Removes any PII(personally identifiable information) from the device and stops the SDK from tracking. See doc.
Mixpanel.mainInstance().optInTracking()
- Use this method to opt-in an already opted-out user from tracking. See doc.
Bool hasOptedOutTracking = Mixpanel.mainInstance().hasOptedOutTracking()
- Returns YES if the user has opted out from tracking.
You can also initialize the SDK specifying a default tracking behavior (e.g do not track until optInTracking()
is called). See doc
let mixpanel = Mixpanel.initialize(token: "MIXPANEL_TOKEN", optOutTrackingByDefault: true)