@john357smith opened this Issue on March 29th 2020 Contributor

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).

@sgiehl commented on March 29th 2020 Member

@john357smith just out of curiosity: your ads are shown on sites that are marked as referrerspam? Or why wouldn't they show up with the list active? Maybe there are some false positives on the list then :thinking:

@john357smith commented on March 29th 2020 Contributor

And that's the problem with this blacklist - everyone can add to it any site he wants. I'm using popads.net and yes this site is blacklisted because somebody was browsing whatever he wanted, saw this domain as an ads provider and put it here with no other reason. And no, you can't be spammed without buying traffic for your domain and verify it's really your domain ...

@sgiehl commented on March 29th 2020 Member

@john357smith feel free to create an issue or PR for the referrer spam blacklist to remove it here: https://github.com/matomo-org/referrer-spam-blacklist

@john357smith commented on March 29th 2020 Contributor

That would be totally useless. The only correct solution is to have option to disable it.

@tsteur commented on March 29th 2020 Member

BTW @john357smith I know it's not a real workaround but if may work depending on your server. Like you could have a cronjob to empty the file containing the spammers every minute until someone works on this issue. In case you are familiar with PHP feel free to issue a PR with a setting for this 👍

@john357smith commented on March 29th 2020 Contributor

I'm familiar with PHP that's why I have already modified code according the proposed change in my first comment so for me I have not only workaound but final solution. But I don't want to fix it after every update. So it seems I have to create a PR anyway ...

@sgiehl commented on April 8th 2020 Member

fixed with #15744

This Issue was closed on April 8th 2020
Powered by GitHub Issue Mirror