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

Location disabled, but sometimes still gets send through. #106

Open
AFASbart opened this issue Apr 14, 2023 · 2 comments
Open

Location disabled, but sometimes still gets send through. #106

AFASbart opened this issue Apr 14, 2023 · 2 comments

Comments

@AFASbart
Copy link

Hello everyone!

We have implemented Mixpanel in Flutter with this package. And for privacy reasons we have disabled the tracking of locations.

But we can still see that some events still contains the location of the user. Even though it is probably only <5% of the events, 1 is too many for us.

Our event contains the country, region and city property. We do not know if this is a Flutter package or the Mixpanel servers doing something funky.

@zihejia
Copy link
Contributor

zihejia commented Jun 4, 2023

hi @AFASbart , would you mind sharing how you disable the tracking of locations? As a best practice, you should call setUseIpAddressForGeolocation immediately after initializing the Mixpanel instance. This will minimize the chance of events containing the user's location.

@AFASbart
Copy link
Author

AFASbart commented Jun 5, 2023

This is the code we use, isn't there a 100% failsafe option?

        _instance._mixpanelInstance ??= await Mixpanel.init(
            useDevKey ? devKey : prodKey,
            trackAutomaticEvents: true);

        // Setting up any extra settings.
        _instance._mixpanelInstance!
            .setServerURL("https://api-eu.mixpanel.com");
        _instance._mixpanelInstance!.setUseIpAddressForGeolocation(false);

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

2 participants