Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable spamlist in configuration #15743

Closed
john357smith opened this issue Mar 29, 2020 · 7 comments · Fixed by #15744
Closed

Disable spamlist in configuration #15743

john357smith opened this issue Mar 29, 2020 · 7 comments · Fixed by #15744
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@john357smith
Copy link
Contributor

john357smith commented Mar 29, 2020

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
Copy link
Member

sgiehl commented Mar 29, 2020

@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 🤔

@john357smith
Copy link
Contributor Author

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
Copy link
Member

sgiehl commented Mar 29, 2020

@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
Copy link
Contributor Author

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

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Mar 29, 2020
@tsteur
Copy link
Member

tsteur commented Mar 29, 2020

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
Copy link
Contributor Author

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
Copy link
Member

sgiehl commented Apr 8, 2020

fixed with #15744

@sgiehl sgiehl closed this as completed Apr 8, 2020
@sgiehl sgiehl added this to the 4.0.0 milestone Apr 8, 2020
@sgiehl sgiehl linked a pull request Apr 8, 2020 that will close this issue
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants