GeoIP in Matomo, previous Piwik map Tokyo wards

295 views Asked by At

According to https://dev.maxmind.com/geoip/legacy/release-notes/

Effective July 24th, we will be mapping more IP addresses to special wards of Tokyo instead of Tokyo itself.

Matomo that I use has enabled GeoIP2 plugin and I have downloaded the free database https://dev.maxmind.com/geoip/geoip2/geolite2/ into misc folder.

As the Geolocation setting now allow to enable this:

enter image description here

Which seems auto-detecting the GeoLite2 binary files under misc folder.

I have written some PHP code to test the GeoLite2 binary file and it seems being able to detect Tokyo ward. For example, I can detect IP address 113.35.99.200

[city] => Array
    (
        [geoname_id] => 1852140
        [names] => Array
            (
                [en] => Shinagawa
                [ja] => 品川区
            )

    )

So the ward seems detected fine.

But from the dashboard where the map is displaying, the visits are still Tokyo. There is all 'undefined' regions in Japan. Switching to Cities, there is only one city "Tokyo".

enter image description here

What happens to other cities or other wards? How can I see them in visitor map?

1

There are 1 answers

0
lw1.at On BEST ANSWER

What is most likely the issue, is that Matomo has upgraded to GeoIP2 and ISO regions in one of the last releases but the map hasn't yet and still uses the old FIPS codes that differ in some regions, which breaks the map in these cases.

You can find out more about this issue here:

https://forum.matomo.org/t/showing-map-of-visits-by-region-doesnt-work/31061

https://github.com/matomo-org/matomo/issues/13691

There is ongoing work to completely replace the map with a modern component which would fix this issue, but this will take some time: https://github.com/matomo-org/matomo/issues/11929