Mixpanel’s client-side libraries collect user location data (city, region, country) as Properties by default. Mixpanel pulls the user’s IP address and runs it through a third-party IP geolocator (MaxMind). MaxMind then returns city, region, and country, and Mixpanel sets those as Properties.
Therefore, the granularity of these properties depends on the IP records obtained from MaxMind. And occasionally, MaxMind is not able to to provide location data all the way down to the city level, so you might find the country Property populated but not city or region.
Why don’t city and region match country?
From time to time, you may see city and region Properties that don’t match the country Property. This is a result of the aforementioned level of granularity available from MaxMind. For example:
- You have a People Profile whose city, region, and country Properties are San Francisco, California, USA.
- That user then travels for vacation and takes actions in Thailand; however, MaxMind is not able to map city or region where the user is, just country.
- The user’s profile then will say San Francisco, California, Thailand - the country has been updated to her most recent location, but since city and region were not available for that location, they remained as the last known city and region Properties.