mixpanel/mixpanel-android

MPConfig.UseIpAddressForGeolocation ignored when also using MPConfig.EventsEndpoint

jensbostrom opened this issue · 4 comments

I'm required to use EU endpoints and have done as described here:
https://developer.mixpanel.com/docs/android#eu-data-residency

I'm also required to disable ip collection for geo location and have done as described here:
https://help.mixpanel.com/hc/en-us/articles/115004494803-Disable-Geolocation-Collection

When I do a test run with my app I can still see the City and Country for my event. I have looked at the source code and MPConfig.UseIpAddressForGeolocation seems to be used only if the MPConfig.EventsEndpoint isn't present. See code below.

        String eventsEndpoint = metaData.getString("com.mixpanel.android.MPConfig.EventsEndpoint");
        if (eventsEndpoint != null) {
            setEventsEndpoint(eventsEndpoint);
        } else {
            setEventsEndpointWithBaseURL(MPConstants.URL.MIXPANEL_API);
        }

setEventsEndpoint doesn't call the getter for MPConfig.UseIpAddressForGeolocation but setEventsEndpointWithBaseURL does.

My workaround is setting ip=0 instead of ip=1 for MPConfig.EventsEndpoint in the AndroidManifest and it seems to work!

hi @jensbostrom , we will fix it.

I’m seeing the same issue. Setting ip=0 seems to stop tracking altogether for me though.

This issue is quite serious as it affects the validity of our privacy documents. Can we get an idea of when there will be a fix?

I’m seeing the same issue. Setting ip=0 seems to stop tracking altogether for me though.

This issue is quite serious as it affects the validity of our privacy documents. Can we get an idea of when there will be a fix?

Strange, it works for me. I'm using version 6.0.0 at the moment.

hi @jensbostrom @georgekeenan , we have released 6.1.0 which contains the fix. I'm closing this one now, please feel free to reopen if the problem still exists.