How To Filter Out Bots, Ghost Visitors & Spam In Google Analytics

Google Analytics does a great job differentiating between real credible visitors & spam or ghost visitors, unlike an alternative like AWStats.

The bot & ghost visitors feature in Google Analytics doesn’t catch all of them, and when it does, the analytics gets skewed with inaccurate information.

It’s caught the eye of the web analysts & Google Analytics communities on Google+ (discussion 1  – discussion 2 ).

It’s the nature of the Internet, so it’s something we have to deal with. Luckily enough, it’s possible to exclude the traffic.

Most of these, in this case, are coming from Russia, specifically Samara, along with a few from Brazil.

The common ones dealt with in this case include:


It’s easy to spot these, so is excluding them from your past & future results.

  • Is it incoming traffic labeled as a referral?
  • Is the referral an uncommon one for your site?
  • Is it coming from the same domain?
  • Is it coming from the same city?
  • Is the only landing page & page(s) visited the front page?
  • The referring site isn’t listed as an inbound link in Google Webmaster Tools?
  • Is the referring site related to your page?
  • Is the bounce rate 100%?

If you answer yes to all of these, then it’s spam, a bot or a ghost visitor. All of them aren’t real visitors visiting your site to enjoy your content, learn more about your business or purchase a product.

To get rid of the data, all past data has to be segmented out & all future data will omit the referring domain.

To segment out the past information:

Click on sessions, new segment, then under “Advanced,” select “Conditions”

Google Analytics Referral Traffic Filtering

For this example, we’ll segment out the common domains mentioned earlier.

Select “Ad Content,” type “Source / Medium” in the search bar & select “contains” in the next menu. Input the domain that’s been giving you inaccurate figures.

Be sure “Sessions” & “Exclude” are selected.

In this situation, most of the domains giving issues have been coming from Samara, in Russia. 100% of my visits from that city were coming from one of those domains. Others also mentioned it in the Google+ discussion.

My website also doesn’t cater completely to that city (something to keep in mind, in case if your website does cater & has received credible traffic a particular city).

For extra accurate filtering, Samara is filtered out (search for “City,” instead of “Source / Medium” in the search bar).

Google Analytics Referral Traffic Filtering - Before Filtering

Unfortunately, this segment will always have to be used if you want accurate data. When viewing “All Sessions” segment, all data from the domains excluded will be included.

To filter these domains in the future, I added them to the “Referral Exclusion List” in the “Admin” section of my Google Analytics account.

Select “Admin,” then under “Property,” select “Tracking Info,” “Referral Exclusion List,” then “Add Referral Exclusion.” Simply add the domain from there.

Google Analytics Referral Traffic Segmentation Filtering

Since this was implemented, I’ve seen no reccurring issues & no further outcry.

If this doesn’t work, some advanced programming will be needed. It’s worth it to get accurate information about your website.

17 Comments on "How To Filter Out Bots, Ghost Visitors & Spam In Google Analytics"

  1. I followed your instructions to filter, but I am still getting traffic from it.

  2. Sorry about the last comment. My bad, I forgot to save it.
    Thank you so much! is gone!!!

  3. Thanks for this article. I just checked my analytics and had a bunch of referrals from Russia so this was super-helpful for me to exclude those groups.

  4. Thanks for taking the time to explain these steps so concisely.

    I’ve uncovered some clunky steps on other site involving the use of filters to exclude these spam referrers and I had no idea about the Referral Exclusion List which is an infinitely more logical way of handling them!

  5. Hi,

    I have a few of these on Analytics. Do you think it makes sense to use Google’s Disavow tool, to tell Google about the spammy links? Even if they’re Ghost URLs?


  6. Excellent guide, I followed the steps and it worked beautifully.

  7. Could I just do a general filter for Russia? We likely won’t get any legitimate traffic from there so I’m not worried about blocking that.

  8. i have different source that i thing they are bot, not same with your example..

  9. Yes, you can do that if you wish, but wouldn’t advise it if Russia matters with your audience. You can also add Brazil to that list, but again, have to look at the audience.

  10. Had problem with bounce rate. This guide helped me.
    Thanks a lot!

  11. Thank you! I followed your steps and saw instant changes in my traffic reporting. Tried doing a filter that I learned on a different site but it didn’t work at all. This one is perfect, thank you!

  12. Glad to hear you found the article helpful (& more importantly, good to hear your analytics are more accurate)!

  13. Thank you for your comment!

  14. These steps will assist you in eliminating the bots you see, even if it’s not the ones listed.

  15. my blog also suffered by these spammy links….but Thanks a lot for your tip for filtering these spams….again thanks for sharing your knowledge

  16. you have done a great job here

Comments are closed.