-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Spam blacklist stored in spammers.txt can't be disabled by any configuration parameters nor this functionality is not mentioned anywhere in administration section. I spent couple of hours with finding why my properly bought ads are not counted in Matomo statistics!
Solution is simple. Replace core/Tracker/VisitExcluded.php code:
if (!$excluded) { $excluded = $this->isReferrerSpamExcluded(); if ($excluded) { Common::printDebug("Referrer URL is blacklisted as spam."); } }
with:
$generalConfig = Config::getInstance()->General; if (!$generalConfig['disable_spam_excluding']) { if (!$excluded) { $excluded = $this->isReferrerSpamExcluded(); if ($excluded) { Common::printDebug("Referrer URL is blacklisted as spam."); } } } else Common::printDebug("Spam blacklist is disabled.");
(and of course add use Piwik\Config;
to import definition).