How to Exclude Bot Traffic From Google Analytics (3 Easy Methods)

Have you ever seen a sudden unusual spike in your Google Analytics? Your website has potentially been attacked by bad bots. And, in most cases, you would want to exclude bot traffic from Google Analytics. Don’t worry! We have you covered with our detailed tutorial.

Bot traffic is one of the false sources of traffic to your site. Yet, a lot of websites experience bot traffic influx. Having bot traffic stats on your Google Analytics gives you an inaccurate picture of your website traffic data. This is why it is very important to exclude bot traffic from Google Analytics. In this tutorial, we will show you how to remove bot traffic data from Google Analytics. 

What Is Bot Traffic?

Bots, spiders, and crawlers are software that runs automated scripts over the internet for different purposes. These bots can be good and bad. Some bots check copyrighted content for search engines, others may scrape your content to clone them.

bot traffic on Google Analytics
Spike due to bot traffic on Google Analytics

Every human interaction on your site is considered a hit on Google Analytics. But, when bots are in action, they generate thousands of hits in a short period. Either way, bot hits are not human interaction on your site. That is why you might want to exclude bot traffic from google analytics to see the real traffic stats of your website.

How to Detect Bot Traffic in Google Analytics

Before you exclude bot traffic from Google Analytics you need to detect bot traffic first. Do you see any sudden unusual spike in your Google Analytics audience overview? This might be because of bots. In such a case, you need to check the sources of this traffic to detect whether they are bot traffic.

Go to Acquisition > All Traffic > Referral on your Google Analytics account. Do you see any bulk number of hits from a single source? Does this source look unusual? If so, check the Bounce Rate and Average Session Duration of that source.

Detect Bot Traffic In Google Analytics
Identify Bot Traffic in Google Analytics

In most cases, the Bounce Rate of bot traffic will be 100% or close and the Average session Duration will be 00:00:00 or close. Also, the referral sources of the bot traffic look unusual like bot-traffic.xyz, 4webmasters.org, www.Get-Free-Traffic-Now.com, and so on. Congratulations you have successfully detected bot traffic in your Google Analytics.

My Site Is Under Spam Bot Attack, What Should I Do?

I experienced such a spam bot attack on my site. When I copied the source URL and hit the browser with it, it took me to a different site offering me services with an affiliate link. This is what spammers do. First, don’t search for it. Best you do nothing except get rid of it. Spammers invite you to get a virus, or trojan infection on your computer, or lure you to get services of their choice. 

As soon as you identify such spam bot traffic to your site, you just try to get rid of them from your Google Analytics. Most importantly, do not visit spam sites.

How to Exclude Bot Traffic From Google Analytics

Excluding bot traffic from Google Analytics will be easier if you follow our guidelines. Once you have successfully identified bot traffic on your Google Analytics account, you can easily exclude that in some easy methods.

Exclude Bot Traffic by Creating Spam Bot Filters

Yes, you can exclude bot traffic from Google Analytics by creating spam-bot filters. This method will prevent new bot traffic from entering your account. Here’s how you can do this.

Go to Google Analytics Admin > All Filters, and now click on ADD FILTER

Exclude Bot Traffic from Google Analytics

Now, give your filter a name, select “Custom” as Filter Type and Campaign Source as Filter Field, copy bot traffic sources that you have identified already on Acquisition > All Traffic > Referral page, and paste that/them in the Filter Pattern box. 

You can add multiple filters by separating them by a vertical bar “|” such as bot-traffic.xyz|4webmasters.org|www.Get-Free-Traffic-Now.com.

Now click on the “Save” button below to put this spam bot filter into action. 

Exclude Bot Traffic From Existing Google Analytics Data

As we mentioned earlier, the method above will only exclude bot traffic coming to your site in the future. But, you might have been affected by bot traffic before. In this case, you need to exclude bot traffic from existing Google Analytics data. We will do this by creating a custom segment.

To create a custom segment, let’s go to Audience > Overview.

Audience overview

Click on “Add Segment” > “NEW SEGMENT

Add segment in Google Analytics
Add segment in Google Analytics

Now, give your segment a name, and click on “Conditions” under the “Advanced” section. Select “Exclude”, and “Source” and match regex from the subsequent dropdown options.

exclude spam bot traffic
Exclude bot traffic from Google Analytics

Now paste the bot traffic source that you have identified before. Click on “Save” at the top to make it work.

Exclude Known Bot Hits With Google Analytics’ Bot Filtering Tool

Google Analytics has a built-in tool to filter to exclude hits from known bots and spiders. With this tool, you can easily and automatically exclude bots, spiders, and crawlers’ hits from your Google Analytics stats. 

Go to Google Analytics’ Admin > View Settings Bot Filtering. Now, checkmark on “Exclude all hits from known bots and spiders”. 

bot filtering
Exclude Known Bot Hits With Google Analytics’ Bot Filtering Tool

Click on the “Save” button at the bottom to put these changes into effect.

Any website can go under a bot attack. But this is surely not the end of the world. We have given you some ways to exclude them from your Google Analytics account. If you have followed our tutorial you should be able to exclude bot traffic from Google Analytics successfully.

Want to get Google Analytics data on your WordPress dashboard? Install a plugin from our list of best Google Analytics dashboard plugins for WordPress.

Amie Suzan
Amie Suzan
Articles: 79

Newsletter Updates

Enter your email address below and subscribe to our newsletter

2 Comments

    • I am not sure. Please contact your hosting service provider. I hope they have an answer to this. Thank you so much for your comment.

Leave a Reply

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