How to Block Unwanted Referral Traffic from Google Analytics report – CG Colors Inc.

We have been getting emails and messages on social media regarding unwanted and un-relevant traffic from spam sites, and it is spoiling the Google Analytics report of various small business owners and SEO folks such as mentioned by this guy in Google Groups.

Google Groups News

So here we are going to give you some tips and tricks to get rid of unwanted referral traffic.

Exclude all hits from known bots and spiders – (Admin > View Settings)

Google Analytics provides a facility to filter the bots “bot filtering” where you can block no-human referral traffic. It has two steps.

  • Go to “admin
  • Click on “view settings
  • Check the box of bot filtering (as shown below)

Google Analytics Bot Filtering

Difference between Ghost spam and Referral spam with the best solution

Ghost spam is directly hit your Google Analytics (GA) and Referral spam hit your website forgetting fake visits and promotions. Check the image for more detail.

Google Analytics Spam Types

You can stop these spamming referrals to some extent from here. Some sites cannot be stopped by GA Bot Filtering, you will have to try another option as well.

How to block the darodar forum & other spam referrals

Admin Filter (Admin > Filter > New Filter) – Here you can block any specific Domain by campaign source. it is a very simple technique and has 4 simple  steps.

  • Go to the “admin” part
  • Click on “filters” (see it in the image 2)
  • Create a “new filter
  • Follow steps according to image 3

(Create New Filter > Filter Name > Filter Type > Filter Field > Filter Pattern)

Be careful while putting URL because the wrong URL will not help block or do any filtering.

Image 2

Google Analytics Filters

Image 3

Campaign Source Filter

This technique is only helpful for spam referrals not for ghost spam. You can also block more than one URL. Use pipe “|” to separate spam URLs (without space).

Block Ghost Spam by Hostname filter (include)

  • If you are getting unhuman traffic from “events, (net-set) data, organic” also that means Ghost Spam
  • This technique is the best technique, suggested by all analytics experts
  • Use all valid hostnames and add them to the hostnames filter – including
  • Check how to find valid hostnames, follow the the given image

Google Analytics Valid Hostname Check

list of all valid hostnames

  • www.yourdomain.com
  • subdomain.yourdomain.com
  • webcache.googleusercontent.com
  • translate.googleusercontent.com
  • www.youtube.com

Google Analytics Hostname Filter Setup

Filter pattern for hostnames
.*yourdomain.com|.*youtube.com|.*googleusercontent.com (no space)
First you have to use a hostname filter than use campaign source filter if you still getting traffic from spamming referral sites

How to Block Any City/Region/Country in Google Analytics

  1. Login with a Google Analytics account
  2. Go to in Admin section
  3. Then click on Filters
  4. And then add a New filter and follow the given steps in the image

Google Analytic Filter for Country Region City

How to block Spam or personal IP Address in Google Analytics

Visits

from the Personal system or the personal office area are worthless so you can block them easily by Filters

Just Follow images and block Spam referral IP or unwanted IP

Google Analytics Blocking Ip Address

Personal IP Block in Google Analytics

Exclude Internal Traffic Google Analytics

Block spam language in Google Analytics

If you are getting spam traffic from unknown languages(check examples in the image) then you can block them by using a language filter.

Follow the given steps…

  1. Login with a Google Analytics account
  2. Go to in admin section
  3. Then click on Filters > Custom Filter > Exclude > Language Setting
  4. Add given text in filter pattern\s[^\s] *\s|. {15,} |\. |, Copy this regular expression code and paste same into your filter pattern. Check the image for details…

Bonus: The Filter takes 24 hours to work properly. Click on “verify filter” to save your time. You can take a maximum of 255 characters in a filter pattern and also add more than one ghost spam by using the pipe “|” separator.

We hope that these tricks will help you to create the correct Google Analytics report with actual traffic coming to your site instead of wrong traffic prediction due to unwanted referrals by different bots.

Cgcolors is a web design and SEO based company with an office in New York. We are here to help small businesses and share the knowledge with outstanding SEO folks.

About the author

Saurabh

Lorem Ipsum is simply dummy text of the printing. Lorem Ipsum has been the industry's standard, when an unknown printer took a galley of type and scrambled it to make a type specimen book.