Country settings for intranet visits



I’m facing a problem that it seems impossible to set the country for intranet visits. We have setup PIWIK on our website, but the website is visited both from the internet and our intranet. If a user visits from the intranet, PIWIK seems to use the locale defined on the machine as country (in our case mostly France, because our computers are configured in French). It would be nice to be able to configure the country to choose given certain IP ranges. That would allow us to set the country to Luxembourg for all our intranet visitors.

Thanks in advance



PS: I just tried GeoIP as indicated in some other thread but as I expected, it didn’t solve the problem. I also set enable_language_to_country_guess = 0 in the config file, but no change.

(vipsoft) #3

Please take a look at Plugin: Intranet subnet identification · Issue #1054 · matomo-org/matomo · GitHub


Hi Anthon,

thank you very much for this plugin.

Maybe the development team can include a preference to handle intranets directly in piwik.




I just tried the plugin, created the following rule in the XLS
10 0 0 0 10 255 255 255 if ($visitorInfo[‘location_ip’]>=‘165813750’ && $visitorInfo[‘location_ip’]<=‘182460405’) { $hostname =‘’; }

added the line to the .php file, restarted the web server but I still see the US flag for my computer (my computer is configured in English and French flag for other computers).


(vipsoft) #6

I’m not the original author of the plugin, but I’ll take a quick look and upload an update.