Ultimate Guide to Blocking WordPress Referrer Spam in Google Analytics

Want to remove referrer spam from your Google analytics reports? Learn how to effectively block WordPress referrer spam and remove it in Google Analytics.

When monitoring your website traffic, it’s crucial to identify fake visitors or referrer spam. At CanadaCreate and our affiliated brands, we have encountered bot traffic on multiple occasions. These visitors arrive at your site and leave almost immediately.

Referrer spam generates misleading information for your site, which can distort your analytics reports with spammy links. Consequently, you may not gain an accurate understanding of your website’s performance. This can adversely affect your ability to enhance user experience and hinder the growth of your online business.

To tackle this problem, we have experimented with and applied various strategies. For example, you can utilize a security plugin to filter out spam traffic, employ a plugin specifically designed to block referrer spam, or manually exclude ghost links in Google Analytics.

In this article, we will guide you on effectively blocking WordPress referrer spam in Google Analytics.

What Is Referrer Spam in WordPress, and How Does It Impact Google Analytics?

Referrer spam in WordPress is a prevalent spamming tactic where fake traffic data is sent to a WordPress site.

This spamming technique aims to contaminate a website’s analytics data with spam URLs, keywords, and domain names.

This issue can distort your Google Analytics reports, as the data shows up under Referral data, potentially impacting your website’s overall page views, bounce rates, and session statistics.

If you notice numerous unfamiliar domains in your Referral reports, they are likely spam referrers.

By blocking these spam referrals, you can enhance the accuracy of your Google Analytics reports and prevent spam requests from contaminating your data.

Now, let’s explore how to view referral traffic in Google Analytics and identify spam.

How to Identify Referrer Spam in Google Analytics

Before taking any action to block referrer spam, it’s important to confirm that your website is affected.

You can detect referral spam in Google Analytics. Start by logging into your Google Analytics account.

Next, navigate to Reports » Acquisition » Traffic Acquisition.

Here, you will find various traffic sources for your website, including referrals.

Then, click the ‘+’ button to add another dimension.

You will now see various secondary dimensions to filter your traffic.

Simply go to Traffic source » Session source from the dimensions dropdown.

Google Analytics will now display the ‘Session source’ dimension for your website traffic.

Review the list for any domains that appear suspicious or unusual. A quick way to identify them is by checking the engagement time. If it shows 0 seconds, it may indicate referrer spam.

Important:If you are new to Google Analytics and have not set it up correctly, we recommend following our guide on how to install Google Analytics in WordPress.

Next, let’s explore effective methods to block referrer spam in Google Analytics for your WordPress site. You can click the links below to navigate to specific sections:

  • Method 1: Block Referrer Spam in Google Analytics Using Sucuri
  • Method 2: Block Referrer Spam in Google Analytics with a Plugin
  • Method 3: Filter Out Ghost Referrers in Google Analytics

Method 1: Block Referrer Spam in Google Analytics Using Sucuri

A straightforward way to prevent common referrer spam in Google Analytics is by utilizing Sucuri.

Sucuri is one of the top WordPress security plugins and includes a website firewall that blocks most common threats, including referrer spam, before they can reach your site.

At CanadaCreate, we previously used Sucuri as our security plugin before transitioning to Cloudflare. It successfully blocked over 450,000 WordPress attacks within just three months. For more details, check out our review of Sucuri.

Sucuri offers comprehensive website monitoring, a malware scanner, integrity checks, and numerous security features. This ensures your website is safeguarded against hacking attempts, malware infections, and brute force attacks.

Important Note: We have conducted a thorough comparison between Sucuri and Cloudflare, and we believe that Cloudflare provides a more robust set of security features. It is also highly effective in preventing referrer spam.

We recommend Sucuri here because it is a reliable tool and a more budget-friendly option. However, if you’re seeking a more extensive security solution and have the budget, consider exploring Cloudflare for broader protection.

To get started, you need to install and activate the Sucuri plugin. If you require assistance, please refer to our guide on how to install a WordPress plugin.

The best part is that no additional configuration steps are necessary after installation, as the plugin functions immediately. Once activated, Sucuri will begin protecting your site from referrer spam and will also scan for malware.

You can also visit theSucuri Security » DashboardVisit this page to check if the plugin has detected any immediate issues with your WordPress code.

For more information, please refer to our comprehensive WordPress security guide.

Method 2: Preventing Referrer Spam in Google Analytics Using a Plugin

If you prefer not to use Sucuri, you can opt for the Analytics Spam Blocker plugin to monitor referral traffic and block spam manually. This free WordPress plugin effectively prevents all types of spam from reaching your website by blocking it at the server level, ensuring your analytics data remains intact.

First, install and activate the Analytics Spam Blocker plugin. For detailed instructions, check our step-by-step guide on how to install a WordPress plugin.

After activation, navigate to the Tools » Analytics Spam Blocker page in the WordPress dashboard to review the plugin settings.

The plugin utilizes a referral spam blacklist to prevent suspected sites from accessing your site and distorting your analytics data.

In the ‘Add a Domain’ section, you can input any suspicious domains that are currently spamming your Google Analytics reports. Exercise caution when adding domains in the plugin settings, as it will block all traffic from that domain, including its sub-domains.

Method 3: Exclude Ghost Referrers in Google Analytics

The initial two methods discussed will effectively block referrer traffic directed to your website.

However, some spammers may not send referral requests directly to your site. Instead, they might target your Google Analytics tracking code to manipulate it into logging a spam request.

These tactics can evade your website’s filters and may still show up in your Google Analytics reports.

You can filter out this ghost referral spam in your Google Analytics account.

To begin, log in to your Google Analytics dashboard and navigate to the Admin view by clicking the gear icon located in the bottom left corner.

Next, select the ‘Data streams’ option found under the ‘Data collection and modification’ section.

This will display the data streams associated with your Google Analytics property.

Click on the data stream where you wish to block spam referrers.

Once you select your data stream, various settings will be displayed.

Scroll down to the ‘Google tag’ section and click on the ‘Configure tag settings’ option.

Then, scroll down to the ‘Settings’ section.

From this point, click the ‘Show more’ option to access additional settings.

You should now see an expanded list of settings.

Next, navigate to the ‘List unwanted referrals’ tab.

This will take you to the configuration screen.

In the Match Type section, select ‘Referral domain contains’ and enter the domain you wish to block.

If you need to block additional domains, click the ‘Add condition’ button.

When you’re done, click the ‘Save’ button located in the top right corner to apply your changes.

Google Analytics will now filter out these referrals from your reports.

We hope this guide has helped you effectively block referrer spam in Google Analytics. You may also want to check out our comprehensive conversion tracking guide for beginners or learn how to set up eCommerce tracking on your site.

If you enjoyed this article, please subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.

Share This Post
DMCA.com Protection Status Chat on WhatsApp