kapa.ai My city field for a lot of users is appearing as 'not defined'. Why? Whereas very few actually have their cities displayed?
Please stand by Rinitha R. as I search the knowledge base. I normally take about 15 seconds or so. đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
The "city" field for many users appears as "not defined" (or "undefined") in Mixpanel reports for a few common reasons: 1. Missing or Unmappable IP Address: Mixpanel derives geolocation data (like city) from the IP address included with the event or profile update. If the IP address is missing from the request, or if the IP address cannot be mapped to a city using Mixpanel's geolocation database (MaxMind), the city property will be "undefined" in your reports. This is especially common for server-side implementations, where the server's IP (often a data center) may not map to a meaningful city, or if the IP is not included at all in the request. For client-side tracking, if the user's IP is masked (e.g., by VPNs or privacy settings), city may also be undefined Supported Properties Data Type: Falsy Values.2. Geolocation Disabled: If you have disabled geolocation in your SDK configuration, Mixpanel will not attempt to derive city information, resulting in "undefined" for the city property Protecting User Data: Disabling Geolocation.3. Property Not Sent: If the event or profile update does not include the city property (either automatically or manually set), it will show as "undefined" in reports Supported Properties Data Type: Falsy Values.4. Manual Data Entry: If you are manually setting geolocation properties and do not include the city, it will remain undefined for those users Manual Geolocation Tracking.In summary, "city" will be "undefined" if Mixpanel cannot determine the user's city from the IP address, if geolocation is disabled, or if the property is not set in the data sent. Only users/events where Mixpanel can successfully map the IP to a city (or where you have manually set the city) will have this field populated.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.