By default Matomo (Piwik) uses the browser language to determine location. To improve accuracy of country detection (and enable Region and City tracking), go to Matomo > Administration > Geo Location. Then, you can select the appropriate solution for your install. These include the PHP GeoIP library from Maxmind (for shared hosting) or a server side solutions such as GeoIP Apache or GeoIP PECL modules (all solutions will also require a geolocation database such as the Lite databases from DB-IP). Learn more about Visitors geo location in Matomo.