Skip to content
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

How to blacklist properties on flutter? #87

Open
Cotspheer opened this issue Aug 11, 2022 · 0 comments
Open

How to blacklist properties on flutter? #87

Cotspheer opened this issue Aug 11, 2022 · 0 comments

Comments

@Cotspheer
Copy link

How can I opt out of certain properties on Flutter? I found something for javascript that, as it seems, does not work on Flutter: Block-Default-Mixpanel-Properties. Property names from here What-properties-do-Mixpanel

Used package: mixpanel_flutter: ^1.6.0

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.19043.1526], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.3)   
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.70.0)
[√] Connected device (4 available)
[√] HTTP Host Availability

• No issues found!

That's my code:

      this._mixpanel = await Mixpanel.init(
        appConfigBloc.state.privatConfig.mixpanelApiKey,
        optOutTrackingDefault: !preferences.state.usageCollectionEnabled,
        config: {
          "property_blacklist": [
            '\$browser',
            '\$initial_referrer',
            '\$carrier',
            '\$radio',
            '\$wifi',
            '\$bluetooth_enabled',
            '\$bluetooth_version',
            '\$has_nfc',
            '\$city',
            '\$has_telephone',
          ],
        },
      );

      this._mixpanel!.setServerURL("https://api-eu.mixpanel.com");

But mixpanel still gets carrier and other not required information. So how do I set this on Flutter? This is mission critical for being compliant with laws of the EU and Switzerland as we only can - and want - track properties that are necessary to improve our service or we need to fix technical issues.

Also I can't drop the properties from lexicon as stated here: dropping-events-and-properties

image

Thanks in advance for any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant