Country detection via language: How does it work?


(Tom Brückner) #1

In its easiest form, Piwik uses the browser language to detect the country where the user is located. I am wondering how exactly this mechanism works. Is it using the HTTP Accept-Language header, or does the JavaScript code send the language based on the navigator object’s language properties?


(Lukas Winkler) #2

In case someone finds the post:

Do not guess country based on the browser language · Issue #9251 · matomo-org/matomo · GitHub


(Tom Brückner) #3

Thanks for the info and linking the Github issue! :slight_smile: