Question

All users get the same country and city with an empty geo source

  • 19 October 2020
  • 3 replies
  • 74 views

Hi!

 

All my tracked user profiles get the Country Code and City properties automatically set somewhere, but all is set to the same city in Germany with the Geo Source property left empty.

How can I get this information to be correct?

If I look at events collected via the Javascript SDK they have the correct Country and City specified, and the PHP events doesn’t have any geo location information at all in them.

 

Thanks!


3 replies

Userlevel 3
Badge +3

Hello,

By using PHP and server-side, you must give the IP of your user to let Mixpanel do the lookup from IP to country.

Hello,

By using PHP and server-side, you must give the IP of your user to let Mixpanel do the lookup from IP to country.

I tried this, but the location information didn’t update anyhow. Still same incorrect information and empty Geo Source.

Userlevel 6
Badge +3

@DanielZ 

If you are seeing your Javascript data correct, but your server-side data incorrect and only coming from one place — it is typically because your data is getting sent with the IP of your server. 

 

As all server-side calls originate from the same IP, such as the IP of your server, it can have the unintended effect of setting the location of all of your users to the location of your datacenter. Have you already seen this Community article? If the Geo Source ($geo_source) user profile property value is null, the location properties were determined through the IP ($ip) property. If the value is “reverse_geocoding”, then the location properties were determined through the Latitude ($latitude) and Longitude ($longitude) properties.

  • Reference this article when handling IP address collection on server-side Mixpanel implementations. 

Reply