Visitor Continet/Country widgets report incorrect

These widgets incorrectly report my IP address (121.72.158.76) as being from North America / United States.

It is however a New Zealand IP, assigned from the main APNIC (Asia Pacific Network Information Centre) block:

NetRange: 121.0.0.0 - 121.255.255.255
CIDR: 121.0.0.0/8
NetName: APNIC-121
NetHandle: NET-121-0-0-0-1

subordinated by APNIC to the ISP -

inetnum: 121.72.128.0 - 121.72.159.255
netname: TCL-CHCHDSL-NZ
descr: TelstraClear Christchurch DSL Customers

Oddly (given the above), the Provider widget does get the ISP correct (Telstraclear). This suggests the data being used for that is correct, so I’m not sure what the other widgets are doing!

Unless you’re using the GeoIP plugin, Piwik is guessing your location from the language locale disclosed by the browser, e.g., en-us -> USA, fr-fr -> France, etc.

In some cases, Piwik will guess the location when the region is omitted, e.g., fr -> France. This can be disabled from config/global.ini.php (or overridden in your config.ini.php):

enable_language_to_country_guess = 0

Ah, that explains it - it’s very common over here to find equipment configured for the US. Must admit I just assumed Piwik would use GeoIP automatically (looks like the Provider widget does, anyway, as that actually gets the ISP right?) I’ll need to look into adding/enabling that plugin - any advice on how to do that welcome!

added anthon answer in the faq http://piwik.org/faq/troubleshooting/#faq_65

Fantastic - thanks for that.

Good news: GeoIP is now integrated in Piwik, enabling Accurate Visitors Geolocation in your Analytics reports. To enable GeoIP go to the Settings > Geolocation admin page, and follow the short instructions.

You can also get an even more accurate Country & City Database from here to enjoy top accuracy in detecting your visitors locations.

See also the documentation about Geolocation - Analytics Reports in Piwik.