Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Exclude unknown urls: Check whether known URL starts with path if one is defined, do no longer match subdomains #9358
In #588 we added this feature to only track a request when it was actually sent from that domain. The description says the following:
However, it also allowed the tracking for any subdomain but it was not described in the UI. This PR fixes it to only perform an exact match (protocol http/https is still ignored). Also if any of these URLs specifies a path we do now check whether the path is present in the tracked URL (see #9320 where we already made similar changes).
May I suggest writing a FAQ/Blog post about this ? I think more people should be made aware of this important feature and modification between 2.15 and 2.15.1.
FAQ: How do I make sure my Piwik installation add my own stats ? (Or how to prevent stats poisoning? Maybe too alarmist...)
"Since Piwik 2.15, when you add a new website or edit an old one in Administration=>Manage Websites, a checkbox under the URLs field as been added to limit which URL Piwik will accept as valid visits. When enabled, Piwik will only track internal actions when the Page URL is one of the known URLs for your website. This prevents people from spamming your analytics with URLs for other websites."
Frankly 2 years ago I was surprised it was not already there. :)
The new information from this ticket could also be added with examples to make it crystal clear for anyone. Something like :
With the checkbox enabled and these sites in the list you can expect this behavior :
URLs + checkbox enable :
Results if one of those link to your Piwik server :
If my examples are bad then it means it's not clear right now! ;)
The examples are good. Now you could even do
BTW: I'm not sure why I explained re subdomains but nowadays there are many services that let you for example create an account with an own subdomain or with a different path (eg
I don't want to sound alarming but since the restriction for sub-domain changed between 2.15.0 and 2.15.1.should it be called a breaking change or at least be underline in the release notes as a different behavior ?
You don't want complains about stats missing after upgrading from someone expecting
As often the case, it's not for me, but I presume 99% Piwik "normal" users don't peruse on Github daily. ;)