Matomo/Piwik tweaks

The Geo locators of MATOMO can assign a IP to

const CONTINENT_CODE_KEY = ‘continent_code’;
const CONTINENT_NAME_KEY = ‘continent_name’;
const COUNTRY_CODE_KEY = ‘country_code’;
const COUNTRY_NAME_KEY = ‘country_name’;
const REGION_CODE_KEY = ‘region_code’;
const REGION_NAME_KEY = ‘region_name’;
const CITY_NAME_KEY = ‘city_name’;
const AREA_CODE_KEY = ‘area_code’;
const LATITUDE_KEY = ‘lat’;
const LONGITUDE_KEY = ‘long’;
const POSTAL_CODE_KEY = ‘postal_code’;
const ISP_KEY = ‘isp’;
const ORG_KEY = ‘org’;

Commercial and free Databases deliver for internet facing system this information ( maxmind, ip2location, .. )
For Intranet you have to do it by yourself. If your IPAM (Ip Address management tool) has this information you can use a plugin from https://github.com/ThaDafinser/Piwik-IntranetGeoIP
to fill this values.

But if you want both you need to combine ( chain)  them by yourself

https://github.com/grzchr15/piwik/blob/master/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php

Dirty but working until LocationProvider Chaining is possible mit Matomo/Piwik