Solved

Wrong location data

  • 31 August 2020
  • 5 replies
  • 250 views

Significant part of users (over 60%) in our reports have the wrong location, which is showing up as Dublin, Ireland, but we know these users are from several other locations other than Dublin. For the rest of users this property works fine.

What may be the reson for this?

icon

Best answer by ThisIsChris 3 December 2021, 00:51

View original

5 replies

Userlevel 4
Badge +3

Are you user using a VPN?

Could you try to save IP’s of your visitor and do a lookup with an external tool?

This is definitely not caused by VPN. Not on such big scale and not this audience.

I am getting the same error. About MY LOCATION, It is showing me that I am somewhere else. I am not using VPN or any adblocker.

Are you perhaps calling MixPanel from the back-end and it is overwriting their location with the location of your server?

Userlevel 4
Badge +5

@kacper @Gaita I checked in with out internal team and it sounds like @ThisIsChris has the best answer!

When this happens is normally due to Server Side updates. Is it possible that you are setting profile properties from your server? If so, the server is possible to be located in Dublin so all your profiles are being considered from there.

To prevent this, we recommend to make all your profile updates from the server using the key $ip=0 in the data payload so that Mixpanel does not infer location from the IP Address of the request. 

A key-value pair of "$ip": "0" flags that the IP on the request should be ignored. This would leave the geolocation information of that profile unchanged. 

This is an example of the data parameter for a profile update using /engage 

{    "$token": "your_project_token",    "$distinct_id": "the_distinct_id_of_the_user",    "$ip": "0",    "$set": {        "$name": "example"    }}


Give this article a look for more details on how to pass an IP address or 0 for your people.set (profile updates) requests.
https://help.mixpanel.com/hc/en-us/articles/115004499343
https://developer.mixpanel.com/reference/user-profiles#profile-set

The suggestions above will fix the issue moving forward but for profiles that already have the location wrong, you can trigger a people.set() operation client-side when your users login, the profile location will be inferred again from the real IP address of the user.

Reply