Is there a way to specifically exclude an IP address when using the python import script? For example we want to exclude all entries from our monitoring system.
In the Piwik frontend just go Settings - Websites --> Global list of Excluded IPs
You can also specify “Excluded IPs” per site.
These values are taken into account during import as well real-time tracking.
We did it like this.
BANNED_IPS = (
In class (at the beginning, first thing to drop):
The Parser parses the lines in a specified file and inserts them into
## All check_* methods are called for each hit and must return True if the ## hit can be imported, False otherwise. def check_ip(self, hit): for x in BANNED_IPS: if hit.ip.find(x) != -1: return False return True
You can use it to drop more than one ip - whole class (simplified version)
192.168.0. -> this gives you all ip’s from 192.168.0.0 to 192.168.0.255