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.

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)

Difference between Ghost spam and Referral spam with best solution

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

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

How to block darodar forum & other spam referrals

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

Go to “ admin ” part

” part Click on “ filters ” (see it in the image 2)

” (see it in the image 2) Create “ 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 wrong url will not help blocking or any filtering.

Image 2

Image 3

This technique only helpful for spam referrals not for ghost spam. You can also block more than one url. Use pipe “|” to separate spam url (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 in hostnames filter – include

Check how to find valid hostnames, follow the the given image

list of all valid hostnames

www.yourdomain.com

subdomain.yourdomain.com

webcache.googleusercontent.com

translate.googleusercontent.com

www.youtube.com

Filter pattern for hostnames

.*yourdomain.com|.*youtube.com|.*googleusercontent.com (no space)

First you have to use 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

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

How to block Spam or personal IP Address in Google Analytics

Visits from Personal system or from personal office area is worthless so you can block it easily by Filters

Just Follow images and block Spam referral IP or unwanted IP

Block spam language in Google Analytics

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

Follow given steps…

Login with Google Analytics account Go to in Admin section Then click on Filters > Custom Filter > Exclude > Language Setting Add given text in filter pattern – \s[^\s]*\s|.{15,}|\.|,

Copy this regular expression code and paste same in your filter pattern. Check image for details…

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

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

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