How to Get Rid of Ghost & Referral Spam for Bloggers

written by Julie Cohn

I talked about ghost spam in your Google Analytics, and how most bloggers have it, but don’t know they have it.   Did you try the tests I mentioned before to see if you have ghost or referral spam?  Horrifying, isn’t it!  Some of the older stuff (qualitymarketzone, freetraffic, best-seo-software etc.) is bad enough but the newer spam (Motherboard.vice and Petition.whitehouse.gov) is even more annoying.  Those pesky spammers try everything they can to reek havoc on your blog numbers, but now it is time to fight back!  Here are a few tricks on how to get rid of ghost & referral spam in your Google Analytics.

How to Get Rid of Ghost & Referral Spam?

There are two things you can do to get rid of the ghost spam in your GA.  If you follow these instructions step-by-step, 95% of your ghost spam will be gone in about 30-60 days. The spam will not be gone overnight, as the filters only work on new content coming in, not the old traffic, but within thirty days you should notice a difference in your bounce rate. (These methods are not 100% fool proof, but will get the  majority of your ghost spam.)

How to Get Rid of Ghost & Referral Spam 1

Referral Exclude Filters

  • Go to Google Analytics dashboard —> Blog name —> All Web Data —>Acquisition (Left-hand side) —> All Traffic —> Referrals
  • Make a list of everything that seems odd or you think should not be there.  Things like 4webmaster, event-tracking, qualitymarketzone (dot) com etc are spam. If you are not sure if something is spam, ask me!
  • Go back to your Google Analytics dashboard.  Click on the Admin button at the top.
  • Under accounts on the left, select your blog name, then on the right, under ALL WEB DATA, click FILTERS.
  • Click ADD NEW FILTER, then type SPAM FILTER #1 in the FILTER NAME.
  • Under FILTER TYPE click CUSTOM, make sure the EXCLUDE button is highlighted, then select CAMPAIGN SOURCE in the dropdown menu.
  • In the FILTER PATTERN you want to type each spam name but without the ending .com .net. Make sure you have a | in-between each name. (shift+)  It should look like this:  4master|event-tracking|qualitymarketzone|   If you have an unusual web address with a .fr or .ru at the end, put it at the end of the the chain like this: 4master|event-tracking|qualitymarketzone.fr  Make sure the / sign (on the ? key) goes after the name and before the (dot) fr.  If you are not sure how to do this, give me a shout.
  • Don’t make your spam filter chain too long, break them up into several spam filters, using steps 3 – 7 for each spam filter.  For example:  abcbunny.com, xyzfrog.net, rstdinosaur.com, exit-left.com, and yabbadabba-do.fr are your spam filters.  You want your spam filter pattern to look like this:  abcbunny|rstdinosaur|exit-left|xyzfrog|yabbadabba-do/.fr
  •  Click Verify Filter.  Your existing spam should show up as filtered in the verification.  If you get an error message that says “This filter would not have changed your data. Either the filter configuration is incorrect, or the set of sampled data is too small.”  This means you did something incorrectly with the filter pattern.  Go back and make sure you have a | between each name, and that if you put the unique endings (.com, .net, .fr)  at the end, you put it in as /.com.

The following is an example of a real spam filter I use.  If you want to block future spam, use my attached spam filter guide to build filters into your Google Analytics before they occur.  All of these have been verified to work against ghost and referral spam.  (Updated 4/27/18)

SPAM FILTER #1: qualitymarketzone|video-production|event-tracking|buttons-for-website|Get-Free-Traffic-Now|hongfanji|windowssearch|google/.fr

Host Name Filter

The other method to get rid of spam is to wipe it out with a host name filter.  Since the majority of ghost spam does not have a true host name (they just guess on the GA tracking code), setting up a host name spam filter is very effective.  To use a host name filter, do the following:

  1.  GA dashboard —> Blog Name —> All Web Data —> Audience —> Technology —> Network
  2. Under the chart you will see two primary dimensions: Service Provider or Host Name.  Click on Host Name.
  3. The only thing you should see here is your web address, any redirecting addresses, and maybe translate.googleusercontent.com.
  4. Make a list of your legitimate host name queries.  Host name queries with a 100% bounce rate are usually spam, but double check to make sure it is not legit before making your host name filter.  If something is in the 30-90% bounce rate range, it should be legitimate, so be sure to include those on your list.
  5. Go to Google Analytics dashboard —> Admin —>Blog Name —> All Web Data —> Filters
  6. Click add new filter, then type VALID HOST NAME FILTER in the filter name.
  7. Click the CUSTOM button, then click the INCLUDE button and click on HOSTNAME.
  8. In the FILTER PATTERN include all your valid host names but leave the .com or .net off until the end.  Use the | symbol between the names.  For example I used: alittlebiteoflife|translate.googleusercontent.com
  9. Click the verify filter button and it should show everything else that will be excluded.

If you have any questions on how to get rid of ghost & referral spam, please reach out to me on Facebook or Twitter, and I will be happy to walk you through it!

Note:  This is an update of an article I did 9/27/15.

You may also like