• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

DawnAldridge.com

Blogger, Proofreader, and Virtual Assistant

  • Contact Me
  • Technical Blogging
    • Google Analytics
    • WordPress
    • How to Master Google Analytics ebook
  • Running a Blog
  • Productivity
    • Shopping
    • Social Media
    • Family Life
  • Resources

How to Remove Referral Spam from Google Analytics

By Dawn 4 Comments

When you review your Google Analytics stats and see your pageviews growing each month, you want to believe those pageviews are all from real people visiting and finding value in your site. Most of them are, but some are not.

 

 You can get a more accurate picture of your blog's traffic if you remove referral spam from Google Analytics. Learn how to easily eliminate spam traffic.

 

Referral spam (also called ghost referrals, crawlers, bots, and spiders) shows up in your referrals in Google Analytics and affects your pageviews and bounce rate. Some of these visit your site with the hope you will click back to their site. Others don’t actually even visit your site at all.

You can get a more accurate picture of your blog’s traffic if you remove referral spam from Google Analytics by following these steps:

  1. Create a new view in Google Analytics.
  2. Activate the bot filtering check box.
  3. Create a filter to only allow hits to valid host names.
  4. Create filters to remove additional known spam referrals.

How to Create a New View in Google Analytics

In my own Google Analytics, I use three separate “views” based on what traffic filters I am using. This allows me to compare traffic and confirm if the filters are doing what I want them to do.

Leave your “All Website Traffic” view intact and make your changes in a separate view so you can always refer back to a clean, unfiltered record if you need to.

google-analytics-views-edited2
Google and the Google logo are registered trademarks of Google Inc., used with permission.

To set up a new view, in your Google Analytics account go to the Admin tab in the gray bar at the top of the page.

Create-view
Google and the Google logo are registered trademarks of Google Inc., used with permission.

Under the View column you should see a drop down box that shows your current view. That drop down box will give you the option to Create New View. You can have up to 25 different views but I am only suggesting adding one new view that includes each of the filters I will detail below.

Name-new-view
Google and the Google logo are registered trademarks of Google Inc., used with permission.

Choose a name for your view and make sure you select your correct time zone.

You can always change the name later by returning to Admin Tab -> View Column ->  Select the view you want to change from drop down menu -> Click on View Settings.

This new view will have no data because it will only start capturing data from the time the view was created.

Filter #1: Remove Known Bots and Spiders

Your first (and easiest) line of defense against spam bots is to filter out spam bots Google is already prepared to block by using the Bot Filtering Check Box in Google Analytics.

You can do this by going to Admin Tab -> View Column ->  Select the view you want to change from drop down menu -> Click on View Settings.

block-spam-bots-shrunk
Google and the Google logo are registered trademarks of Google Inc., used with permission.

In the next screen, check the box near the bottom of the screen that says Exclude all hits from known bots and spiders and click Save at the bottom.

Filter #2: Remove Ghost Referrals that Never Visit Your Site

Some pageviews come from ghost referrals that never even visited your site. They simply pick numbers randomly but never land on your blog’s host server.

To filter out these ghost referrals you need to create a filter to only allow hits to your own host name(s). First you need to know what host names are valid for your blog.

How to Find Your Own Valid Host Names

In your Google Analytics dashboard go to Audience -> Technology -> Network

Change the Primary Dimension, above the grid, from Service Provider to Hostname.

You will also want to change the date range from the past 30 days to the life of your blog (or whenever you started using Google Analytics).

Find-host-name1
Google and the Google logo are registered trademarks of Google Inc., used with permission.

Review the list of host names to determine which one are valid for your blog. Anywhere you have entered your Google Analytics tracking code would be a valid host name (i.e. email newsletter service, ecommerce shopping cart, YouTube channel).

In my case, I had my website URL and two URLs related to my Mail Chimp newsletter service that are valid host names. These are the host names I will use for setting up my new filter:

  • www.revealnaturalhealth.com
  • revealnaturalhealth.us3.list-manage.com
  • us3.campaign-archive.com

Create View to Only Include Valid Host Names

Before following these steps, make sure you create a separate view in Google Analytics using the steps above. 

To add a new filter, go to the Admin tab. Under the View column on the far right, make sure the drop down shows the view you want to edit. Further down under the View column, find and select Filters.

On the next screen, click on the red + New Filter button.

  • Choose a name for your filter.
  • Select the Custom filter type.
  • Select button to Include.
  • Under filter field choose host name.

New-filter-on-host-name1

Under Filter Pattern, fill in all valid host names, as determined above. If you have more than one valid host name, separate each host name with a vertical line and no spaces.

In my case, my filter pattern looks like this:

www.revealnaturalhealth.com|revealnaturalhealth.us3.list-manage.com|us3.campaign-archive.com

You will need to update this filter if you add your Google Analytics code to a new tool, such as PayPal.

Filter #3: Remove Other Known Spam Referrals

Now that you have filtered out the bots and spiders Google is already prepared to block, and you have filtered the ghost referrals that never even hit your blog’s server, now it is time to remove other known spam referrals that pop up.

edit-filters-menu-edited
Google and the Google logo are registered trademarks of Google Inc., used with permission.

To add a new filter, go to the Admin tab -> View column -> select the view you want to edit -> select Filters.

Click on the red + New Filter button.

On the next screen:

  • Choose a name for your filter.
  • Select the Custom filter type.
  • Select button to Exclude.
  • Under Filter Field choose Campaign Source.

exclude-filter-for-referral-spam.

Under Filter Pattern fill the names that show up in your list of referrals that you know are not valid referrals (i.e. not social media sites, search engines or blogs that have linked to you).

In my case, I picked the ones that were still showing up after I had implemented the host name view. You can enter multiple referrals into the same filter by separating each name with a vertical line and no spaces.

Here’s what my filter pattern looks like:

semalt|best-seo-offer|buttons-for-website|buttons-for-your-website|100dollars-seo|videos-for-your-business|success-seo

New spam referrals may pop up, so be sure to check your stats monthly and update your filters as needed.

Additional Resources

I found this site helpful when I first set up my filters: Definitive Guide to Removing Referral Spam by Analytics Edge

It is also a good idea to add a filter to block hits from your own IP address. This will keep your own pageviews from falsely increasing your total pageviews (because, really, does anyone spend more time on your site than you do?). Here is a complete tutorial of How to Remove Your IP Address From Google Analytics.

Have you taken steps to remove referral spam from your Google Analytics stats?

You can get a more accurate picture of your blog's traffic if you remove referral spam from Google Analytics. Learn how to easily eliminate spam traffic.

 

Reader Interactions

Comments

  1. Laura says

    July 4, 2016 at 12:50 am

    When I search “what is my ip?” I got 2 different numbers. Is that because I have a dual band wifi router? How would I choose which number to enter?

    Reply
    • Dawn says

      July 5, 2016 at 8:14 pm

      You have a public IP address assigned by your internet service provider, and you may also have a private IP address assigned by your router. You would want to use the public IP address because that is the one that would show up in Google Analytics. When you Google “What’s my IP?” you may have one come up as the public IP address. The format of mine is xx.xxx.xxx.xxx I hope that helps!

      Reply
  2. Erin says

    November 30, 2016 at 12:33 pm

    This was really helpful! When I got to the step where I needed to find my host names, I followed your directions and nothing was returned. I just started out so I am sure the only hostname I have is my web address but that makes me wonder if I have tracking set up properly. I have been getting stats even today. Does this sound like what I should check out or something else?

    Reply
    • Dawn says

      December 1, 2016 at 7:29 am

      Hi Erin! As long as you are seeing pageviews showing up in Google Analytics, that means you have analytics installed successfully on your blog. Yay!

      Another thing you can check to make sure GA is installed correctly on your blog is if you use the Chrome browser you can add a free extension called Tag Assistant. This will also confirm that you only have Google Analytics installed in one place on your blog. Your stats would be messed up if you pasted the code in multiple spots. You can check any website with the Tag Assistant. I just checked yours and you are good there 🙂

      If you installed GA and checked your hostnames the same day, you might not see anything because the date range in GA defaults to go through yesterday’s date instead of today’s date.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Welcome!

Hi. I'm Dawn. I am married with two active kids, a boy and a girl. I enjoy reading, photographing family activities, and preparing home-cooked meals. My education is in business, my working background is in accounting, and I love creating spreadsheets to organize just about everything.

I started blogging in 2013. During my blogging journey, I realized how much I enjoy digging into the technical side of blogging and helping other bloggers to understand analytics and the behind-the-scenes workings of WordPress.

Let’s connect!

Search this site

Privacy Policy -- Disclosure
Terms of Service

Copyright © 2023 · Lifestyle Theme · Genesis Framework by StudioPress Themes