mixpanel-flutter icon indicating copy to clipboard operation
mixpanel-flutter copied to clipboard

Disabling Location Updates for User Profile Not Working

Open ghost opened this issue 10 months ago • 0 comments

Description: I am trying to prevent Mixpanel from updating the user’s location when modifying their user properties and sending backend events related to their profile. I attempted to use the following command: mixpanel.setUseIpAddressForGeolocation(false); However, this does not seem to work as expected. Despite calling this method, Mixpanel continues to update the user’s location in their profile.

here is my code:

// Import Mixpanel import 'package:mixpanel_flutter/mixpanel_flutter.dart';

Future mixpanelTest( String token, String userid, String userPropertyValue) async { final mixpanel = await Mixpanel.init(token, trackAutomaticEvents: false);

mixpanel.identify(userid);

// Disable geolocation from IP parsing mixpanel.setUseIpAddressForGeolocation(false); // Disable geolocation

mixpanel.getPeople().set('Test User Property', userPropertyValue);

// mixpanel.setUseIpAddressForGeolocation( // true); // Re-enable geolocation for future events }

ghost avatar Feb 13 '25 15:02 ghost