Guide To Removing Referral Spam in Google Analytics

Brandon LazovicJuly 15, 2018

If you’re like me and are constantly looking at analytics reports on ways to improve your website’s performance, you’ve probably noticed a weird influx of web traffic from random referral sources that garner unusually high bounce rates and low times spent per session. This is likely a case of referral spam, which is annoying as it affects the rest of site data. It’s a simple fix and this guide will show you to a few ways on removing referral spam in Google Analytics.

What is Referral Spam?

Referral spam comes from spam bots or programs trafficking your website and having their hits recorded on your Google Analytics account. The easiest way to identify referral spam is by identifying traffic sources that have a 100 percent bounce rate or a 0 percent bounce rate. Another identifier is when there is zero time spent on the site per session duration.

If you choose to visit the source URL’s, be cautious and have a good anti-malware or Ad Block installed on your computer and browser.

The technique behind referral spam involves repeated website requests using a fake referral URL that a spammer is trying to advertise. The spammer may never even visit the afflicted website, which is also known as ghost spam.

Checking your Referral Spam Traffic

Checking Referral Spam Traffic in Google Analytics Photo

Go into your Google Analytics account and under “Acquisition” click the “Referral Traffic” tab on the left side of the screen. Here you can see your referral traffic sources and which ones are hurting your metrics with high bounce rates and low session durations. Write them down in a Word Document and read on for the next step to filter them out of your Google Analytics reports.

Methods in Google Analytics to Remove Referral Spam

Referral Exclusion List in Google Analytics Photo

There are a few different ways to remove referral spam; a lot of articles on the internet suggest using the Referral Exclusion List on Google Analytics, which is the wrong method to use when excluding traffic from a 3rd party.

This tool is used to exclude traffic from 3rd party shopping carts on e-commerce websites. When a customer is redirected to that shopping cart and then comes back to the verification page on the main website, using the Referral Exclusion List prevents them from being counted in a new session as a referral.

You might assume this would prevent that source of traffic from being counted in Google Analytics, but what GA does is connects the returning visit to the previous source and medium. It’s not viewed as referral or direct traffic, but the data is still skewed in GA as that referral traffic is assigned to a different medium/source.

Excluding Known Bots and Spiders

Exclude Known Bots and Spiders in Google Analytics Photo

The first step to take when excluding spam referral traffic is to go into GA and click the “Bot Filtering” button in the “View Settings” tab in your “Admin Settings.” This will exclude all hits from known bots and spiders on the Interactive Advertising Bureau’s International Spiders & Bots List. The only downside to using this option is that it doesn’t exclude bots and spiders that aren’t on this list, calling for other methods for the spam referral traffic that goes undetected.

These kinds of bots shouldn’t be confused with beneficial bots and spiders that crawl your website for Google search indexing; these bots aren’t tracked by the Google Analytics source code, so excluding all bots and spiders from accessing your website is a bad practice if you want to rank in the Google Search Results.

Create A New Filter For Referral Spam

Create New Filter For Referral Spam in Google Analytics Photo

The right way to exclude referral spam is to create a new filter in “View Property” in “Admin Settings”. Here’s how you create a new filter:

  1. Click “Admin Settings” in your GA account
  2. Under “View” click on “Filters”
  3. Add a New Filter and name it “No Spam” or “Referral Spam”
  4. Set the Filter Field to “Custom”
  5. Click the “Exclude” button
  6. Set the Filter Field to “Campaign Source”
  7. Enter the URL’s of your spam referrals. Add a backslash just before the period to separate the URL identifier. For example, in, add the backslash www.pingl.\net.
  8. If you have multiple URL’s to add, separate them with a | . For example: pingl\.net | www.partysuppliesnearme\.com
  9. Save your settings

What this does is that the spam traffic is filtered from those specific sources by turning them into a regular expression for spam sites that need to be removed from GA. It will take approximately 24 hours for this filter to take effect in GA.

Create a Custom Segment to Remove Spam Data from GA

Creating Custom Segment in Google Analytics

Beyond adding this filter, you can create a custom segment to view your accurate metrics separate from the spam traffic. Here are the following steps to create a custom segment:

  1. In your Audience Reporting View, click on “Add Segment” and select “New Segment.” You can name this new segment “No Spam” or “Referral Spam.”
  2. Select Advanced Conditions on the left side of the segment options.
  3. Select “Sessions” and “Exclude” in your filter options.
  4. Select “Source” and “Matches Regex”.
  5. In the box next to “Matches Regex,” copy and paste the expression that you created with the filter in your Admin Settings.
  6. Save this segment.

Now you can compare your site metrics with the spam traffic excluded from your reports, as well as have your spam traffic in a separate view in your Google Analytics account. Unfortunately doing this won’t separate previous hits, but it will prevent future hits from appearing in your GA data.

Other Methods to Block Incoming Spam

There are ways to completely block referral spam through website coding efforts, but I won’t dive into the technical aspect of deterring ghost spam through this method. It takes technical know-how and should be left to your website administrator, as it can cause serious issues if performed incorrectly.

If you have a site on WordPress, you can download the Jetpack, Aksimet Anti-Spam and Wordfence plugins to block incoming spam on your website. These aren’t full-proof, but they are effective in deterring spam referral traffic trying to crawl your website.

Guide To Removing Referral Spam in Google Analytics Wrap-Up

If not taken care of, referral traffic will present skewed version of your website performance, reducing credibility as a brand as you identify what traffic you’re bringing to your website and the viewing/conversion behaviors of that traffic.

While we’ve successfully removed ghost spam in your Google Analytics account, it’s important that you’re actively checking your referral traffic to continue getting rid of the referral spam that goes undetected. With one spam site block comes thousands more that slip through the cracks every day.

This article explored removing referral spam in your Google Analytics, but another consideration when adding filters to your data is making sure that your internal traffic isn't skewing your numbers from employees accessing your website.

What did you think of this guide on removing referral spam on your website? I would love to hear your thoughts in the comments section below! If you haven't already, be sure to check out my other Google Analytics tip post on using the Benchmark Reports to compare your site to your competitors!


Guide to Removing Spam Referral Traffic In Google Analytics
Guide to Removing Spam Referral Traffic In Google Analytics

This is likely a case of referral spam, which is a simple fix and this guide will show you to a few ways on removing referral spam in Google Analytics.

Digital Marketing
Social Media
Digital PR
Tool Reviews
Local SEO                                                          

Sitemap           Privacy            Editorial Guidelines
Copyright © 2021 Brandon Lazovic LLC. All rights reserved.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram