Exclude some particular log lines
There are several ways to exclude particular log lines or visitors from being tracked.
- you can exclude specific IP addresses or IP ranges from being tracked. To configure excluded IPs, log into Matomo (Piwik) as Super User, then click Administration > Websites > Settings.
-
the script provides an option to exclude visits with specific User Agent HTTP headers — via
--useragent-exclude
-
the script provides an option to enforce a whitelist of all URL hostnames that should be considered — all other log lines with a hostname not in the list will not be imported. See the option:
--hostname
-
it is also possible to exclude specific log lines where the URL path matches a particular URL path. See the option
--exclude-path
For example, to exclude all files from the URL example.org/assets/ you would write --exclude-path="/assets*"
To exclude two paths, you would write: --exclude-path="path1/here*" --exclude-path="/sub/path2*"