In Auto Page view event, the location of the user is not consistent, lot of times the event comes, with only user's country and not city. How can I solve this?
Hi Anshul S., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
This usually happens when Mixpanel can’t map the request’s IP to a city, or when the IP isn’t included in the request. In those cases, City/Region can be “undefined” while Country is still populated. This is expected for some traffic (e.g., VPNs, limited IP databases, or server-side sends without client IP) (Supported data types: Falsy values). Ways to improve City coverage: - Ensure the client IP is sent: for server-side or proxy setups, pass the end-user IP in the event as ip (events) or $ip (profiles), so geolocation is derived from the user rather than your server (Define IP Address; Default properties). - Manually set geolocation: include $city, $region, and mp_country_code (events) or $country_code (profiles) directly in payloads; these override IP-derived values (Manual geolocation tracking). - Use latitude/longitude for higher precision: set $latitude and $longitude so Mixpanel reverse-geocodes to a city (Manual geolocation tracking). - If you don’t want geolocation at all, disable it: configure SDKs to not use IP, or set ip=0 per event/profile (Disabling geolocation; Define IP Address — Ignore IP).Note: Auto Page View is client-side; if some events still lack city, it’s likely due to IPs that can’t be mapped in MaxMind, VPNs, or intermittent absence of IP. Mixpanel uses IP to derive $city/$region/mp_country_code at ingestion and discards the IP afterward (Geolocation overview).
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.
