Skip to content
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

Unexpected result of viewing visitor map in country zoom #13691

Open
fdellwing opened this issue Nov 9, 2018 · 15 comments
Open

Unexpected result of viewing visitor map in country zoom #13691

fdellwing opened this issue Nov 9, 2018 · 15 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@fdellwing
Copy link
Contributor

fdellwing commented Nov 9, 2018

If you view the visitor map on country level you are able to see city, but not state visitors.

matomo6
matomo7

Should be fixxed before #13687 is merged to not confuse people.

@fdellwing fdellwing changed the title Unexpected result of viewing Locations in country zoom Unexpected result of viewing visitor map in country zoom Nov 9, 2018
@fdellwing
Copy link
Contributor Author

@tsteur Can you look into that? The states are clearly defined, as you can see on the right, but are shown as "unknown" on the map.

@tsteur
Copy link
Member

tsteur commented Nov 11, 2018

I'm not so much into the maps. I reckon this might be because of the GeoIP2 update @sgiehl ?

@sgiehl
Copy link
Member

sgiehl commented Nov 11, 2018

Yes. That's likely caused by GeoIP2. Our map is quite outdate for some states and (except of USA and Canada) it's defined with FIPS country codes (which was used for GeoIP Legacy). GeoIP2 switched to ISO codes for all countries, which makes it impossible for nearly all countries to match the regions anymore.
We need to recreate all our maps to make the compatible again. But as our map generator doesn't work anymore and the JS lib we are using to show everything isn't maintained anymore we might need to build it from scratch. Already started with some first steps on that, but I currently don't have any time to move forward with that project. Hope to be able to do that till end of the year

@fdellwing
Copy link
Contributor Author

Than I propose to hold #13687 back until this is done.

@sgiehl
Copy link
Member

sgiehl commented Nov 11, 2018

Btw. As the regions for Germany don't differ that much between FIPS and ISO you might be able to see quite accurate data when applying this change:

diff --git a/plugins/UserCountryMap/javascripts/visitor-map.js b/plugins/UserCountryMap/javascripts/visitor-map.js
index 4df3681..5682781 100644
--- a/plugins/UserCountryMap/javascripts/visitor-map.js
+++ b/plugins/UserCountryMap/javascripts/visitor-map.js
@@ -1437,7 +1437,8 @@ $.extend(UserCountryMap, {
         "SVN": "region",
         "GBR": "region",
         "ESP": "fips-",
-        "USA": "p", "CAN": "p"
+        "USA": "p", "CAN": "p",
+        "DEU": "p"
     },

     // custom country label positions [lon, lat]

@fdellwing
Copy link
Contributor Author

Will try that tomorrow at work.

@fdellwing
Copy link
Contributor Author

The map is now colored, but the numbers do not match with the numbers to the right. As far as I can see, they at least correspond with the general high. Meaning: The highest number right is also the highest state on the map.

matomo8

@sgiehl
Copy link
Member

sgiehl commented Nov 12, 2018

That's because you are viewing different metrics: visits <> unique visits

@fdellwing
Copy link
Contributor Author

Well, than it is just confusing. But better as before with no data on the map.

I can't tell, how this will look in other countries, but I would not merge it if there is any chance to do more harm than good.

@sgiehl
Copy link
Member

sgiehl commented Nov 12, 2018

refs #11929

@mattab
Copy link
Member

mattab commented Nov 13, 2018

@sgiehl applying such patch to fix region mapping sounds nice (didn't know this would have been possible...) 👍
Could we maybe do this for a few other countries as well?
Otherwise as it seems to work, could we push this in core so regions in Germany map work soon?

@sgiehl
Copy link
Member

sgiehl commented Nov 13, 2018

That case works for Germany, but not for many other countries. But it would also break the map for those still using GeoIP Legacy

@heurteph-ei
Copy link

Is it the same as #20527?

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/probleme-de-geolocalisation-et-statistiques-absentes/53255/2

@Chardonneaur
Copy link

I got a user feedback today asking to get a region/state view level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

8 participants