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
[2.4.1] VisitorMap wrong visit summary? #5854
Comments
Just to make sure: Is it possible that there are visitors with location "unknown" or from any other country not visible on this map? |
Yes i have such visitors. Is that a problem? |
If there are 5 visitors having an unknown region it would explain the difference between 231 and 226. |
@tsteur i have 7 unknown visitors, when i view this: SELECT count(1) FROM piwik_log_visit
where idsite =16 and visit_first_action_time between '2014-07-17 00:00:00' and '2014-07-17 23:59:59'
and location_city IS NULL is the query this way correct? would be only 2 visitors to much? But the count from unknown visitors make only sense on the global map? If i click on north america, i only want north america? |
I think in this case you wanna search for It is possible that the United States was detected as country for 231 visitors but it was only able to detect the region for 226 visitors of those 231. So displaying 231 visitors would be correct but we should definitely mention the number of unknown regions or cities depending on the zoom level, otherwise it can be confusing |
It's exactly 5 with your query: SELECT count(1) FROM piwik_log_visit
where idsite =16 and visit_first_action_time between '2014-07-17 00:00:00' and '2014-07-17 23:59:59'
and location_region is null and location_country = 'us' It comes from the browser language to country guessing..(which is now disabled). Yeah mention those 5 would be less confusing. |
Has anyone an idea how to display those unknown visitors? Any suggestions? Maybe it is enough to display on hover (title) on the text "231 visitors...": "231 visitors 5 of those with unknown region/city" |
@tsteur i would only show them on the global map. |
+1 for suggested solution |
I already tried to fix it but couldn't. Maybe someone else can have a look? Otherwise I'd invest more time |
When loading the global data, they are saved "forever": Do this:
And then in this function, the value from the global map is used. Because the new loaded data from region get never globally updated: //BTW: Pretty crazy JS file Oo (maybe a refactor in some time) |
Done! I noticed after some more research there is already a function that displays the number of unlocated cities and region on the (i) info button on the bottom left. I do now display it in the title if there are any as you suggested. Tried to display it on hover as title/tooltip but this didn't really work since the title which contains the number of visits sometimes disappears etc. Indeed a refactoring wouldn't be that bad ;) That's why I was so struggling |
a solution well done! |
I have two locations, where my visitor come from US.
The summary in Visitor map (top left) shows 231, but should be 226?
The text was updated successfully, but these errors were encountered: