Additional option for 'Excluded IPs'


I’ve installed PIWIK 1.2.0 on one of my websites and set it to track two Domains. Today I discovered that it also tracks the copy of one of these webites (a static html website) stored on my local hard disk when I’m online, although the url is absolutely different from the url set in PIWIK settings. I was really surprised to see urls pointing to my own hard disk in the statistics. Probably this happens because I inserted the tracking code manually into each static html page on my PC, before uploading them all.

If I look at my local copy of the website the url starts with “file:///C:/Program Files/…” and currently PIWIK doesn’t accept to enter such an url into ‘Excluded IPs’. Would be nice to have the option to exclude activity on my own hard disk.

(vipsoft) #2

if (window.location.protocol != 'file:') {


I’m absolutely php illiterate, so I just guess your reply is a piece of code for one of the next versions…:)-D

Thanky you!

(Thomas Seifert) #4

Thats not PHP, thats JavaScript, and you can modify your tracking code put into the pages like that to avoid tracking file: links.


[quote=“Thomas Seifert”]
Thats not PHP, thats JavaScript…[/quote]

Doesn’t make a lot of difference to me - I’m JavaScript illiterate, too :? However, I can copy and past the code…
Thanks again.