In this blog post we explain what is Referrer spam, this new kind of spam that has recently appeared on the Internet. We also provide solutions to stop it and preserve the quality of your analytics data.
What is Referrer Spam?
Referrer spam (also known as log spam or referrer bombing) is a kind of spamming aimed at web analytics tools. A spammer bot makes repeated web site requests using a fake referrer URL to the site the spammer wishes to advertise.
Here is an example of referrer spam in action:
Half of those referrers are spams, here are some well know spammers that you may have seen in your logs:
The benefit for spammers is that their website will appear in analytics tools like Matomo or Google Analytics:
- public analytics reports (or logs) will be indexed by search engines: links to the spammer’s website will improve its ranking
- curious webmasters are likely to visit their referrers, thus bringing traffic to the spammer’s website
How to deal with Referrer Spam?
Referrer spam is still new and analytics tools are all handling it differently.
Referrer Spam in Matomo
Referrer spammers are automatically excluded from your reports to keep your data clean and useful.
New spammers are continuously detected and added to Matomo’s blacklist on each update. If you find a new spammer in your analytics data, you can even report it so that it is added to the Piwik’s open referrer blacklist and blocked for everyone.
Referrer Spam in Google Analytics
Google Analytics doesn’t offer any spam protection by default. It can however be configured manually using a custom Filter.
To create a filter in Google Analytics go to the Admin section and click on All Filters. Create a new custom filter that excludes based on the Campaign Source field. In the Filter pattern enter the spammers domains you want to exclude (this is a regular expression):
If new spammers arise you will need to update this list. You can also use Piwik’s referrer blacklist to exclude all the spammers currently detected.
Other Analytics Tools
Many web analytics tools do not yet handle Referrer spam and when using these tools, you will often find a lot of spam data in your Referrer Websites analytics reports.
If you use an analytics tool that does not exclude Referrer spam, we recommend to contact the vendor and ask them to implement a mechanism to remove these referrer spammers. As of today many analytics vendors still have not mitigated this issue.
Public List of Referrer Spammers
At Matomo (Piwik) with the help of our large community we have decided to tackle this growing spam issue. We have created a list of up to date referrer spammers that anyone can edit.
The list is available in a simple text file on Github: github.com/piwik/referrer-spam-blacklist.
The list is released under the Public Domain and anyone can use it within their applications to exclude referrer spammers.
Many people have already contributed new spammers to the list. We invite you to use the list in your apps and websites and help us keep the list up to date!
Let’s unite and fight the spammers together.