New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not guess country based on the browser language #9251
Comments
This was the whole reason to detect country from language, so that "Piwik by default" has some location data to show. clearly it could be confusing, but maybe instead we could show an alert or notice in the app to invite users to setup Geolocation? |
I think there is already one, but it's not very visible and we still get reports. Even worse: Once the data is tracked it is hard or impossible to remove the incorrect data that was tracked in the past |
I would suggest to not show the map, and show the default message instead (the message that is already in the table view of country report): Note: You are using the default location provider, which means Piwik will guess the visitor's location based on the language they use. Read this to learn how to setup more accurate geolocation. |
I'd suggest to do the geolocation setup while Installation, but make it
skippable with a warning that location data won't be available until it is
set up.
|
Setting up during installation sounds good if doesn't add too much complexity for user etc. Warning during installation might be good as well, although I am a person who would ignore and possibly not even read it :) Too excited when installing new things and just want to get it installed haha. I'd also hide the maps (Real time map and visitor map) although this is probably why @mattab wants to guess the country to have some data here. Maybe we could show a button and a text instead of the maps saying something like "Visitor Map is not shown as no Geolocation provider is enabled. We can show you the map but tracked country data might be inaccurate as it will be guessed based on the language. To get accurate location results install Geolocation [link to faq]. BUTTON [Activate guessing the country based on language]". On top maybe once a month we could trigger a notification to a super user saying "No geolocation provider is installed, to get accurate results install a provider [link to FAQ]". User might get options to say "Don't bother me with this warning again" . |
Additionally I would suggest to automatically choose a better provider than the default one. Most hosters also provide geolocation modules that could be used instead. |
That would be very helpful 👍 |
How exactly is the language detected? Does Piwik use the Accept-Language header, or does it send the language via JavaScript, i.e. based on the |
@derwaldgeist the language is detected based on header only |
@sgiehl Thx! |
Just ran into this issue. I guessed that I needed to find some geoloc settings, which could use some re-doing, maybe even possibly include setting up geolocation in the Matomo setup page? The second, worse, issue is that once user is tracked by the original language-based settings, it seems Matomo does not re-evaluate when Geoloc settings change. |
It should do this on the next visit... but not for previous visits |
By default Piwik seems to guess the country based on the browser language and it is indeed weird as @RMastop pointed out in #9243 (comment)
I agree that there should not be a country report based on language as it is often/sometimes wrong and leads to confused users and we've had a couple of issues in the issue tracker because of that I think. Confused users etc should be ideally not one of the first impressions that users get of Piwik. I'd personally even consider stop using the tool as it doesn't seem to work correctly and I would doubt about the correctness of all other shown reports after seeing this. If we track the browser language and show it in the language report I'm not even sure if there is so much additional value to guess a country. Of course one can see a map etc but not sure if that's worth it.
The text was updated successfully, but these errors were encountered: