whenever an event is triggered in mixpanel, we get the city, country where it has been triggered from. when the same person, at the same place, with the same IP address, triggers another event on another day, the city is changed. how is that possible? whay did this happen?
Hi Nitya G., 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 can happen even when the user, device, and IP appear unchanged.From the docs, Mixpanel derives geolocation (city/region/country) by looking up the IP address in MaxMind’s GeoIP database at ingestion time, and it does not store the IP itself—only the derived location. [Default properties; Geolocation overview]Because of that: 1. GeoIP database changes over time
MaxMind periodically updates mappings of IP → city/region/country. The same IP can resolve to a different city on a later date if MaxMind’s data changed (e.g., IP blocks reallocated, corrections made). Mixpanel always uses the current mapping at the moment the event is ingested, so older events can show one city and newer events another, even for the same IP. [Geolocation overview]2. Approximate / noisy IP-based location
IP-based geolocation is explicitly described as an approximation. If the IP is near a boundary between cities or is part of an ISP / mobile network that routes traffic through different points, the resolved city can fluctuate between nearby locations over time. [Geolocation overview]The docs do not mention any per-user caching of IP→city, so each event is independently enriched using the then-current GeoIP lookup, which explains why the same user and IP can show different cities on different days. [Default properties]If you need stable or more accurate locations, the docs recommend manually setting geolocation (e.g., $city, $region, $country_code or $latitude/$longitude) instead of relying solely on IP. [Manual geolocation]
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.
Let me check the knowledge base for you again. One moment! 📚
Mixpanel is not detecting the user’s physical place; it is resolving an IP address to a city at the moment each event is ingested, using MaxMind’s GeoIP database. [Geolocation overview]Two key points from the docs explain why the city can change even if the user hasn’t moved and the IP “looks” the same: 1. IP → city mapping can change over time
Mixpanel looks up the IP in MaxMind’s database on every request and only stores the derived geolocation, not the IP itself. If MaxMind later updates how that IP block is mapped (e.g., reassigns it to a different or more specific city), the same IP can resolve to a different city on a later day. [Default properties; Geolocation overview]2. IP-based geolocation is approximate
The docs explicitly call IP-based location an approximation. For IPs near city boundaries, behind ISPs, mobile carriers, VPNs, or changing network routes, the resolved city can fluctuate even if the user is physically in the same place. [Geolocation overview]If you need a stable city for that user, the recommended approach is to manually set geolocation properties ($city, $region, $country_code or $latitude/$longitude) instead of relying on automatic IP-based enrichment. [Manual geolocation tracking]
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.
