I'm running Piwik 3.1.0 and have an issue with visitors geolocation.
While checking if my Piwik tracking plugin (CMS side) was working fine, I've notice the problem below.
From visitor log, my own "visit" is from the Country Czechia, but if I go in Settings / Geolocation.
With GeoIp( php ), click on Refresh.
It display Switzerland (which is correct).
How can I have two different result between visitor log and geolocation setting ?
It looks like my setup is not correct or, there's a bug somewhere.
Thanks for your help
Does the problem still occur?
Could you then please execute this mysql query and post the result?
SELECT option_value FROM piwik_option WHERE option_name = 'usercountry.location_provider';
Sorry for replying late ...
Luckily, I've found what the issue was.
Logged in as admin account, go to Administration / System / Pricacy / Anonymize Visitors' IP addresses
I've changed from the recommended setting 2 bytes to 1 byte.
From now, visitors country geo-location are correct.
You may add some hints in the documentation and/or web UI about this.
Thanks for your help anyway
You could also leave it with 2 bytes and activate that GeoIP will be done before the IP is anonymized...
If if I leave 2 bytes, the GeoIP doesn't work anymore (at least for countries).
Did you change the option below to allow enriching visitor data before anonymizing the ip?
No, the option "Also use the Anonymized IP addresses when enriching visits." is enabled.
you need to disable it, then geoip will work with any option for anonymized ip.
now I understand better, thanks
you can close this bug report