Mixpanel Community Icon

Discrepancy in User Profile City vs. Event City Settings

·
·

why in the user profile properties i get a different city than the one the user gets set when they do their events?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Juan I., 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    This discrepancy between the city in user profile properties and the city set for events is a known behavior in Mixpanel. The difference occurs because profile geolocation properties and event geolocation properties are set at different times and can be influenced by various factors. Here's why this happens:1. Different update times: Profile geolocation is updated every time profile properties are set, while event geolocation is parsed at the time the event is tracked. This means that the profile location may not match all events from the same user.2. User mobility: Users may log in or update their profile from one location, but then travel and perform events from another location without updating their profile.3. IP address changes: Mixpanel uses the IP address of the request to determine geolocation. If a user's IP address changes (e.g., due to travel or using a VPN), it can result in different locations for profile updates and events.For example, as explained in the Geolocation FAQ:"Your user may login to your app in the US which sets the profile geolocation to the US. Then they may travel to Germany and track many events using your app without updating any profile properties since they are already logged in. In this case, we will see some events stemming from Germany despite the user profile location being in the US."To ensure consistency or if you know the accurate location of your users, you can consider manually defining the geolocation properties in your data, as suggested in the Geolocation documentation.

    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.