Welcome to the “Ultimate Guide to Stop Referral Spam in Google Analytics”. If you’re tired of dealing with pesky referral spam skewing your website’s data, you’re in the right place. In this comprehensive blog, we’ll dive into effective strategies to combat Google Analytics referral spam and maintain accurate, reliable data.


Learn how to leverage the referral exclusion list in Google Analytics, discover smart referral tracking techniques, and ensure your website analytics are free from unwanted noise. Say goodbye to misleading metrics and hello to actionable insights. Let’s take control of your analytics and make informed decisions!


Spam is the most annoying and huge part of the internet. Spam is used to send viruses and harmful malware to the system. To make the most of Google Analytics data, it is essential to remove spam from referral Google analytics.


Let’s dive in!


What is Referral Traffic?

You must have a solid understanding of referral traffic in general before you can understand spam referral traffic. Referral traffic, at its most basic, is traffic that comes to your Website after being “recommended” by another website.


In general, websites that have been linked to your Website generate genuine referral traffic.



Ready to Hire WordPress Developer for your dream project?

We have a team that will get you there.


Let’s Talk With Us


What is Referrer Spam?

Google Analytics referral spam is a spamming technique to send a request using a fake URL.


It affects those WordPress Sites that are only partially ready. This spamming technique aims to send misleading data to your Website and pollute it. In addition, it affects your internet rankings, visibility, bounce rates and session reports. Spam referrals’ sole motive is to target search engines to promote the site of their wish.


Unfortunately, if Google notices that your site is linked to spam, your site will be considered poor quality, and your ranking will drop drastically.


So if you observe any suspicious-looking domains in your referrals, Google Analytics, you must block and report them immediately.


Read More: A complete guide to know how to conduct reporting in GA4


How to Know if your Website has Spam Referral traffic?

Many web experts become aware of spam referrals when they notice unnatural traffic growth on their Websites. You must look into new traffic sources to discover Google Analytics Referral Spam. The most accurate and fastest way to find spam is to check referral traffic Google analytics. If you observe sites like free-share-buttons, your site is affected by spam.


Types of Google Analytics Referral Spam

There are two types of spam referral traffic – Ghost Referrals and Crawler Referrals.


Referral spam get rid of it

      Source- Web Designers Vancouver | Lara Spence web design


1. Crawler Referral- This type of spam contaminates your Website by visiting your site and making Google Analytics count the referral information.


2. Ghost Referrals- This type of spam does not affect your site traffic, as it bypasses your Website and directly attacks the referrals google analytics server. It is also referred to as phantom spam. It has a significant impact on pageviews and counts sessions of Google Analytics.


Both types are hard to distinguish because they look similar in your report, but you need different techniques and approaches to block them.


Read More: AI Affect the Future of Digital Marketing


Ways to Block Referral Spam:


1. Remove Referrer Spam using Sucuri

This is the simplest method to remove referral spam Google Analytics. Sucuri is the best WordPress security plugin comprising one of the best website firewalls in the market. It identifies and blocks referrer spam even before it reaches your Website.


Sucuri comes with dozens of security features which take care of the integrity check, malware scanner and constant monitoring of the Website. Sucuri protects against the spam activities of hackers and other brute-force attacks.


2. Manually Remove Referrer Spam with the Help of a Plugin

If using Sucuri is not feasible for you, you can use Plugin to keep track of referral traffic on Google Analytics and block unwanted traffic.


Installing and activating the Stop Referrer Spam plugin is the first step. Follow this step-by-step instruction to install a WordPress Plugin. After activation, visit Settings and select Referral Spam to review plugin settings. Then add all the suspicious domains in the Plugin and block them. The next step is to save the settings using Save Button. It is advisable to remain extremely careful while blocking the domains as it will also block all the traffic from its subdomains.


3. Remove Unwanted Google Analytics Referral Traffic with .htaccess

The .htaccess file stops spam activities by making a virtual roadblock for spam referrals. You can avoid spam referral traffic before entering your site by adding a spam referral ban section. Adding a code to your .htaccess file saves your Website from unwanted spam. Make sure you have a site backup before making changes using .htaccess.


4. Block Ghost Referral using Filter

There is only one ideal method to remove Ghost Referrals Google Analytics, which is via Filter. It will help if you use the Google suggested exclusion filter – ‘campaign source‘.Before creating filters, you must consider a few things.


  • Study Google’s Filter Guide
  • Keep backup of an unfiltered profile because you cannot reverse the effects of filters
  • Never apply filters on your primary profile before testing it on sandbox profiles



Are you looking to elevate your business’s online presence?

We’ll help you increase brand awareness, drive traffic to your website, and ultimately, boost your bottom line.



Contact Us

Read More: The Future of Digital Marketing: AI Challenges to Keep an Eye on in 2023


Follow The Below Steps to Set Up Campaign Source Exclusion:

  1. Enlist valid hostnames and segregate each hostname with a pipe character.
  2. Select Admin on the Google Analytics account
  3. Choose view and select ‘Filters.’
  4. Enter a Filter Name and select Campaign source under Filter Field.
  5. Type your code in the ‘Field Pattern’
  6. Use Filter Verification to test your new Filter and save the changes.

For different Google Analytics versions, you must apply different techniques to remove spam.


Filter in Google Analytics Crawler Spam

To exclude Crawler Spam from referral traffic, google analytics follows the below steps:


  1. Open Google Analytics Account
  2. Choose Filters under the ‘Admin’ option and choose Add Filter
  3. Enter your filter name, select ‘Custom’ under Filter Type and then click exclude.
  4. Choose Campaign source from the field and enter one domain into the box.
  5. Save the changes.


Remove Spam Referrals in Google Analytics 4

Follow the below steps in Referrer Google Analytics:


  1. Log in to your Google Analytics account and select Admin view.
  2. Choose Data Stream Option under the Property Column.
  3. Go to the Advanced Setting Section and select the ‘More Tagging Settings’ tab.
  4. After reaching the configuration screen, choose ‘Referral domain Contains’ from Match Type.
  5. Add the domain name you wish to remove or block, and with the help of the Add Condition button, you can add another domain also.
  6. Save the changes after finishing all the above steps.

All Google Analytics referral spam will be removed from your reports.


Remove Spam Referrals in Google Analytics Older Version

  1. Select Admin view under your Google Analytics Account.
  2. Choose the Filter option from View Column
  3. After the Filter screen appears, click on the Add Filter button.
  4. Now you can customise your Filter settings using Custom Filter Type.
  5. Choose the Campaign Source option from Filter Field.
  6. Finally, add the domain name you wish to block.


Few Things to Consider While Writing a Domain Name:

  • Always use backlash and a dot in the domain name.
  • Separate each domain name with a pipe sign.
  • Put a dot and asterisk(.*) before the last domain name.
  • Store your settings with the save button.


Block Unwanted Referral Traffic Google Analytics Using Third Party Tool:

Using WordPress, you can eliminate bot traffic using a Google Analytics WordPress referral spam plugin.


Sucuri, which tracks referrer spam and takes it from your Website, is your best choice. Additionally, as a complete website security solution, this Plugin may shield your Website from DDoS attacks.


If Sucuri seems excessive to you, consider giving Stop Referrer Spam a try. This Plugin uses a public list of referrer spammers published by Matomo, the company that created the Google Analytics substitute Piwik.


There are a few more choices, but as they were last updated a while ago, they might not work with your WordPress installation.


Read More: How Digital Marketing Company Can Save Your Business


Things you Should Not Use to Filter in Google Analytics


1)Referral Exclusions


You may find it easy to add domain names to your Referral Exclusion List; some people suggest it as an easy fix. But it would help if you avoided REferral Exclusions to block unwanted Google Analytics referral traffic because Referral Exclusions are used to stop new sessions from starting while the current session is still running. For example, a customer returns to your shop after checking a third party’s products.


This statement, “Traffic that arrives at your site from the excluded domain doesn’t activate a new session,” causes misunderstanding. You may think that the entire session will be excluded. But this is not the case, though. The visit is recorded as a direct session despite no referral traffic session.


While it may appear in your reporting that the spam traffic has been eliminated, what you have done is changed the spam referral traffic into direct spam traffic. Therefore, your figures will still need to be corrected.


2)Filter using Hostnames


Spammers think two steps ahead of us. We remove the domains that sound unnatural and think our Website is safe from spam referrals. But spammers try to make the domain as natural as possible so you cannot easily identify it. So in filtering out bad traffic, you could also remove the organic traffic.


Let Us Grow Your Revenue… 


          ✅ Increase revenue with done-for-you marketing

          ✅ Custom marketing strategy backed by data and results

          ✅ Affordable marketing services with no long-term contract


Let’s Talk With Us

Read More: Latest Digital Marketing Trends For 2023


Final Words

In conclusion, combating referral spam is crucial for maintaining accurate data in Google Analytics. By implementing various preventive measures, such as filtering techniques and verifying legitimate traffic sources, website owners can ensure their data is reliable and make informed decisions. Regularly monitoring and updating filters is essential in staying ahead of evolving spam tactics.


Remember, a clean analytics dashboard leads to better insights, improved SEO strategies, and ultimately, a more successful online presence. Safeguard your data, and say goodbye to referral spam’s disruptive impact on your website’s analytics, empowering your business to thrive in the digital realm.


Unwanted referral traffic google analytics affects the integrity of your Website, so it is essential to block the spam referral. Syndell provides customised WordPress security plugin Solutions that ensure the complete safety of your Website and provide better results. Connect with us for more.