Skip to content

Disable spamlist in configuration #15743

@john357smith

Description

@john357smith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions