{"id":749,"date":"2018-06-10T22:55:26","date_gmt":"2018-06-10T20:55:26","guid":{"rendered":"https:\/\/bretterhofer.at\/blog\/?page_id=749"},"modified":"2018-06-10T22:55:26","modified_gmt":"2018-06-10T20:55:26","slug":"matomo-piwik-tweaks","status":"publish","type":"page","link":"https:\/\/bretterhofer.at\/blog\/matomo-piwik-tweaks\/","title":{"rendered":"Matomo\/Piwik tweaks"},"content":{"rendered":"<p>The Geo locators of MATOMO can assign a IP to<\/p>\n<p>const CONTINENT_CODE_KEY = &#8216;continent_code&#8217;;<br \/>\nconst CONTINENT_NAME_KEY = &#8216;continent_name&#8217;;<br \/>\nconst COUNTRY_CODE_KEY = &#8216;country_code&#8217;;<br \/>\nconst COUNTRY_NAME_KEY = &#8216;country_name&#8217;;<br \/>\nconst REGION_CODE_KEY = &#8216;region_code&#8217;;<br \/>\nconst REGION_NAME_KEY = &#8216;region_name&#8217;;<br \/>\nconst CITY_NAME_KEY = &#8216;city_name&#8217;;<br \/>\nconst AREA_CODE_KEY = &#8216;area_code&#8217;;<br \/>\nconst LATITUDE_KEY = &#8216;lat&#8217;;<br \/>\nconst LONGITUDE_KEY = &#8216;long&#8217;;<br \/>\nconst POSTAL_CODE_KEY = &#8216;postal_code&#8217;;<br \/>\nconst ISP_KEY = &#8216;isp&#8217;;<br \/>\nconst ORG_KEY = &#8216;org&#8217;;<\/p>\n<p>Commercial and free Databases deliver for internet facing system this information ( maxmind, ip2location, .. )<br \/>\nFor Intranet you have to do it by yourself. If your IPAM (Ip Address management tool) has this information you can use a plugin from <a href=\"https:\/\/github.com\/ThaDafinser\/Piwik-IntranetGeoIP\">https:\/\/github.com\/ThaDafinser\/Piwik-IntranetGeoIP<\/a><br \/>\nto fill this values.<\/p>\n<p>But if you want both you need to combine ( chain)\u00a0 them by yourself<\/p>\n<p><a href=\"https:\/\/github.com\/grzchr15\/piwik\/blob\/master\/plugins\/GeoIp2\/LocationProvider\/GeoIp2\/Php.php\">https:\/\/github.com\/grzchr15\/piwik\/blob\/master\/plugins\/GeoIp2\/LocationProvider\/GeoIp2\/Php.php<\/a><\/p>\n<p>Dirty but working until LocationProvider Chaining is possible mit Matomo\/Piwik<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Geo locators of MATOMO can assign a IP to const CONTINENT_CODE_KEY = &#8216;continent_code&#8217;; const CONTINENT_NAME_KEY = &#8216;continent_name&#8217;; const COUNTRY_CODE_KEY = &#8216;country_code&#8217;; const COUNTRY_NAME_KEY =<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/pages\/749"}],"collection":[{"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/comments?post=749"}],"version-history":[{"count":1,"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/pages\/749\/revisions"}],"predecessor-version":[{"id":750,"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/pages\/749\/revisions\/750"}],"wp:attachment":[{"href":"https:\/\/bretterhofer.at\/blog\/wp-json\/wp\/v2\/media?parent=749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}