How to Block Countries in Google Analytics

Home / search / How to Block Countries in Google Analytics

Are you tired of getting spam visits from certain countries? This tutorial will go over how to block and filter website visits from Russia and other countries easily in Google Analytics.


Step 1: Review your Website in Google Analytics

Below is an example of a website that started to get a lot of spam visits. Originally, the webmaster was happy to see the visits come to the website. It became obvious though that these visits were actually bots from another country. These visits were bots that were coming in from Russia. We confirmed this in step 2 of this tutorial.




Step 2: Use the Geo Location Tab




Now, I have nothing against Russia and I have nothing against China too. However, Russia had a lot of visits recently which was a bit about. The other areas that confirmed that these were fake visits was the 100% bounce rate, the 1.00 Pages / Session, and the Avg. Session Duration set at 00:00:00. Right there, I could tell that these sessions where actually bots that were pinging my friend’s website.


Let’s take it a step further and click on Russia to see what else we can discover.




I clicked on Russia and Google Analytics showed me where the visitors were coming from. I will now go forward and block these bots from being recorded on my website!


Step 3: Create a Custom Filter


The image below shows that I need to go to the Admin tab at the top of my Google Analytics dashboard. As a note, you will need to admin rights to block out the countries. If you are the admin then your are fine, but if you are not, you should contact your webmaster to either do this next step or give you access to do this.


Next, I am brought to this screen below. The step that I need to do is click on the tab filters. As a note, I did white out the name of the website that this Google Analytics account belongs to.



Here you have to create a custom filter. All you will need to do is click on the red box that says new filter


Next, I want to block some visitors who are coming from a certain country. See this image below for what I put in to block this particular city. As a note, you need to create a custom filter type to have an option to block a city. That is why under filter type the box custom is in a darker color since I am using it.



Check to see if it has worked with a verification tag. I clicked on verify this filter to see this image below. This image below tells me that there have been 90 visits so far from this region in Russia.


Step 4: Wait a day and check your results


It is important to check your dashboard the next day just to make sure you have blocked those visits that were coming to your website. You will notice with the image below that those visits dramatically dropped off after we created the custom filter.




We have now blocked certain countries from reporting visits in our Google Analytics account! Since we did this, our dashboard will start to improve with metrics like bounce rate, pages per visit, time spent on the site, and more.


Here is a related article on how to block Semalt and other spam sites to your website. 


  • Hi,
    I think this is a great tutorial, I have a very new website and currently working on the analytics etc. Already I have noticed country’s that I don’t feel comfortable with checking out my site although it’s just been put online the other day. Thank you for sharing this post, extreemly helpful.

    • Greg Kristan

      Thank for the kind words! It seems like spam visits have certainly been more aggressive of late within Google Analytics, so I am happy this was able to help you!


  • I just tried the steps in your tutorial and I installed the IQ Block Country plug-in in my WordPress site yesterday. According to the plug-in, it blocked 55 visits, but GA still reports them. Now that I have your system in place we’ll see how this double block works out. Some days I don’t get anyone from Russia and some it’s more than 50. Thanks.

    • Greg Kristan

      Hi Jeff,

      That is really cool that there is a plugin, I did not know that! There seems to be a lot more spam this year in Google Analytics compared to last year. Most seem to be pinging from Russia.


  • I appreciate the tips, but I’ve tried this and it still doesn’t work. I’m doing the steps here AND using the IQ block country plugin and still getting tons of traffic from Russia. Any other ideas?

    • Greg Kristan

      Hi Dave,

      Can you target the exact city in Russia that is pinging your site? If so, you can then block that city as well. A big city that was pinging my site was from Samara Oblast


  • Greg, we just did this very trick for a new client. On June 2nd, there daily average visitors went from 25 to over 150… Guess from where? Russia. Much like your friend’s site, they were bots pinging the site, increasing bounce rate, lowering average time on site and killing their analytics data. These filters among some others are in place now and we’ll see the improvements soon.

    Do you have experience in blocking the all too known and disruptive “” bots? Would love to know your thoughts on this and how to combat this fake data. – Patrick

  • Sandro

    Morning Greg, do I have to set up different filters for each country I want to exclude? Or can I just drop a number of countries in one, by separating them by | ?

    Thanks in advance.

    • Greg Kristan


      I think that is a great question actually. I am not entirely sure, but I think it is definitely worth a try. Could you let me know if that works for you?



  • Vic Phillips

    Just to clarify, These steps don’t block people in that country from being able to view your website correct? It simply instructs google analytics from recording those visits.
    I know one commenter was “worried” about visitors viewing her site.

    • Beth

      I believe it’s just to block the report of the visits. I would like to know how to block the countries from visiting my site!

Leave a Reply

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