Traffic Bot in Google Analytics – How to Block It Out?

Traffic Bot in Google Analytics – How to Block It Out?

Google Analytics is the most important source of information about website traffic. However, sometimes the information can be distorted by bots. How to avoid it? How to block bots from Google Analytics? Keep reading and find out!

Latest on our blog: What Is Cornerstone Content and Why Is It Important?

Unfortunately, a scenario when the bot messes up with Google Analytics data happens quite often. The important thing is to realize that something’s wrong, catch the anomalies in the statistics, and block the bot so that the data obtained from the tool is the most accurate and useful business-wise.

During the last couple of days, the bot problems occurred on many websites. Suspicious traffic can come from addresses like:

  • /
  • /
  • /
  • /
  • /
  • /

Traffic Bot in Google Analytics

How To Check If  Traffic Bot Visited Your Website?

If you noticed any anomaly in the website traffic (such as presented in the picture above), you may suspect a bot has hit your site. You can confirm that in 2 places within Google Analytics:

1. Go to “Acquisition” -> “Organic Traffic”

finding traffic bot in Google analytics

2. Go to “Behavior” -> “Site Content” -> “All Pages” or “Landing Pages”

If you notice any significant traffic from the above-mentioned addresses your site has been hit by a bot! Now, it’s time to eliminate it so it won’t mess with your stats anymore.

How to Exclude Bot Traffic from Google Analytics?

1. Bot removal from the data already collected

Creating a new filter won’t do if you want to analyze data already collected within GA – it will only work with future data. In this case, the best way is to create a segment, that will remove the bot data from the display.

  • Click on “Add Segment” at the top of Google Analytics
  • Configure the excluding segment. “Conditions” -> Exclude sessions where the browser size contains (not set).

block traffic block from ga

After saving the segment, you can see traffic data that excludes bot data or comparing all data with the excluded ones.

blocking traffic bot

2. Creating a filter that will prevent collecting bot data in the future

  • Go to “Admin” -> “View” -> “Filters” -> “Add Filter”
  • Choose “Custom” filter-> filter field “Request URI” -> type in the filter pattern: .*trafficbot.*|.*traffic-bot.*|.*bot-traffic.*|.*bottraffic.*

google analytics traffic bot filter setup

  • Test the filter

google analytics traffic bot filter test

I recommend first creating the filter in a Google Analytics test view and then adding it to the main Google Analytics account if everything works fine.

3. Blocking bot in robot.txt file

Blocking the bot in the robot.txt file will make it impossible to enter your website. To do this, you need to add this code to your robot.txt file:

user-agent: bot-traffic,bottraffic,trafficbot

disallow: /

The above exclusion will work only on this specific bot – trafficbot, bottraffic lub bot-traffic. If your website will be hit by the differently named bot, you will need to adjust the blocking procedure similarly.

Marketing Coordinator - Kasia

Marketing Coordinator

Marketing and employer branding responsible since 2017. She wants Delante to be heard! Her experience has made her love design and analytical thinking, and that's how she approaches every task. A lover of travel and music, discovers new series in her free time or grabs the saxophone.
Comments (8)
    1. There is a . missing at the beginning, it should be

    2. You need to start with a . -> then the regex will work

      The . at the beginning, will solve this, otherwise the regex code starts with the repeat of nothing (which is the first *) and that’s invalid. Now it will start with any digit (.) and then repeat that (*) etc.


Leave a Reply

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

Recently on our blog

Are you curious about SEO of online stores or maybe you want to enter the Swiss market and wonder SEO abroad looks like? You will find answers to these questions and many other tips important for the development of your business on our blog.

What Is Cornerstone Content and Why Is It Important?

What Is Cornerstone Content and Why Is It Important?

For quite a long time now, Google has been appreciating websites with unique, quality content. However, it’s obvious that not all of your blog posts can be ranked first. After all, you probably don’t care about each piece of content the same way. To devise an appropriate strategy, you can benefit from cornerstone content that combines content marketing and SEO. What is it and why is it so crucial?

Read more
Should You Do SEO On Your Own?

Should You Do SEO On Your Own?

Do you dream about succeeding in digital marketing, knowing that appropriate SEO activity can help you achieve the goal? Great! In today’s entry, you’ll find out what to pay attention to when conducting the process on your own and what potential challenges you may face.

Read more