Matomo (Piwik) plugin to locate all locale data of a user based on the IP address/subnetwork (country, region, city, latitude, longitude, provider, ...)

Please use it only for INTRANET tracking everything else just dont make sense :-)

This plugin is compatible with Matomo 2 (see requirements below for more details).

What does this plugin do?

It adds visitor information based on the matched IP address from your configuration. Not more and not less.
The database schema and UI stays untouched, so all Matomo (Piwik) statistics can be used like you would use a internet GeoIP database.

How to configure/install this plugin / the networks?

After installation and activation of the plugin, open the file piwik/config/IntranetGeoIP.data.php

You can their add your location information and their subnetworks.

See the file piwik/config/IntranetGeoIP.data.php or see the readme on github https://github.com/ThaDafinser/IntranetGeoIp

What statistics are available?

If you create a full configuration data file, you'll see
* Visitor -> Realtime visitor map
* Visitor -> Location and provider
* and many more...(in generall all statistics are available like using a internet GeoIP database)

Why there stands provider "unknown" in my visitor log?

If your installation is stock, all visitors will get this "flag" to show you, what IPs are not matched.
You can adjust or remove this, by changing the "noMatch" block in your IntranetGeoIP.data.php file.
If you remove the complete block, none matched visitors will be skipped by this plugin.
But you can also fill all possible visitorInfos like you are used for matched IP addresses.

Can i use this plugin with a internet GeoIP database side by side?

Yes you can.
Just remove or comment out the noMatch block in your configuration file.

Note about the configuration?

Inside the array key visitorInfo you can freely add/remove all available columns from the log_visit table you want.
The keys below are just a suggestion, since they are the only one which make sense currently IMO.
All available fields, see here: http://developer.piwik.org/guides/persistence-and-the-mysql-backend#visits

Inside they key networks add all subnetworks which apply to this location.