This is a fork of the Piwik plugin IntranetSubNetwork from https://github.com/pklaus/IntranetSubNetwork/, originally forked from http://dev.piwik.org/trac/ticket/1054. This version updates the plugin for Piwik 2.x compatibility.
This plugin identifies the number of visitors from your local network (Intranet) or from any other subnet.
This is done by assigning the network different names in the file [IntranetSubNetwork.php][] (see the [lines below #115][]). This example lets Piwik assign the network label Global IPv4 to any IPv4 visitors:
<?php
if ($ip->isInRanges(array('0.0.0.0/0'))) { $networkName = 'Global IPv4'; }
?>
- Create the folder
./IntranetSubNetwork
in the plugins folder of your Piwik installation.
Then copy the plugin files into that folder. - (optional) Adopt the networks defined in [IntranetSubNetwork.php][] to your needs.
- Activate the plugin on Piwik's settings page.
- Add the Visitor Networks widget to your Piwik Dashboard.
cd /var/www/path/to/your/piwik/installation/plugins/
git clone git://github.com/kwasib/IntranetSubNetwork.git
As of v0.7.0, the name of the database column which stores the network category name has changed. To update previous installs, run the following:
ALTER TABLE piwik_log_visit CHANGE location_IntranetSubNetwork location_subnetwork varchar(100);