Incorrect region visualisation on Visitor Map

Hello everybody!

We are using Piwik 3.0.4 on Ubuntu Server 16.04 for our intranet site.
First, I want to thank you for the possibility to use this nice tool! =)

I have just installed it and everything seems fine, except one weird issue with Visitor Map. The problem is that it shows me wrong region.

In details, I installed and configured IntranetGeoIP plugin to analyze our intranet.
Here is a piece of config/IntranetGeoIP.data.php file for our intarnet:

[
    'visitorInfo' => [
        //ISO-3166 alpha-2 code http://en.wikipedia.org/wiki/ISO_3166-1
        'location_country' => 'ua',

        //the region code (i take them from piwik/libs/MaxMindGeoIp/geoipregionvars.php
        'location_region' => '12',

        //should be freetext
        'location_city' => 'Kyiv',

        //get this from a picker, e.g. http://www.tytai.com/gmap/
        'location_latitude' => '50.445358',
        'location_longitude' => '30.519057',

        //enter your company name or do it based on your domain hierarchy
        // Provider requires the "Provider" Plugin to be active. (Disabled by default in Version 2.15 and above)
        'location_provider' => 'MyCompany'
    ],
    'networks' => [
        //enter here all subnetworks for this location
        //use a subnetwork calculator, e.g. http://jodies.de/ipcalc
        '192.168.0.0/16'
    ]
]

Data is being collected correctly which I can see on Visitors → Real-time Map.

However, when I go to Visitors → Locations and zoom to Regions level on Visitor Map I see that incorrect region is highlighted on it.
As you can see in the picture all visits are from Kyiv (Kyyiv, Kiev - that is because I tried different city names in ‘location_city’) but Map shows all visits from Luhans’k region:

Also I tried to change the ‘location_region’ => ‘11’ and Map showed me correct region (Kyiv), but in every other place Piwik says that visitors are from Krimea region! =)
So, I think that there is some misconfiguration in Visitor Map. Maybe there is some inconsistency between codes used to show Visitor Map and those in libs/MaxMindGeoIp/geoipregionvars.php file which is used to configure IntranetGeoIP plugin.

Unfortunately I am not yet skilled in PHP debugging, so I would appreciate any help how to troubleshoot this issue.

Thank you!
Roman.

Hi,

as the IntranetGeoIP plugin is a third party plugin not maintained by piwik, it may help to contact the developer directly:

Hi, @Findus23 !
Thx!

I am not sure whether this issue caused by plugin itself. It seems that Visitor Map has the issue, but I don’t know yet how to debug it.

I can’t make request from outside our intranet.
Is there a way to make a request with some particular geo- data using a browser itself so I could see if Visitor Map works correctly without IntranetGeoIP plugin?

Thx!

You are right, it is also possible it’s a bug in piwik, that didn’t get noticed jet as it only appears in combination with IntranetGeoIP.

Unfortunately I can’t think of an easy idea how to debug this.

I will try to find a way, I just need more practice =)