How do I filter bot traffic in Google Analytics

Filtering bot traffic in Universal Analytics and GA4

Google Analytics is a great tool for monitoring website traffic, conversions, and obtaining business intelligence. Bot traffic, however, can ruin your Google stats and affect bounce rates, session duration, conversion rates, and so much more. 

Typically, signs of bot hits include a massive uptick in site traffic, extremely high bounce rates, and extremely low session duration.

Google Analytics bot traffic

Google Stats altered from bot traffic

Keep an eye out for URLs hitting your site that look like this: 

  • trafficbot.life
  • bottraffic.live
  • bottraffic143.xyz

The best way to block these traffic bots is to set up Google Analytics filters - here's how to do it:   

Universal Analytics: 

1. Sign in to Google Analytics, select the gear icon in the bottom left, and select "Filters" 

2. Select "ADD FILTER" 

3. Select "Create New Filter" and fill out Filter Information: 

  • Filter Type: Custom
  • Exclude: 
    • Filter Field: Request URI
    • Filter Pattern: bot traffic URL 

4. Verify your filter (showing data from last 7 days) 

5. Save 

 

setting up a Google Analytics filter

 

GA4 Analytics:

GA4 vs Universal Analytics

*note* - GA4 Analytics filters out bot and spam traffic automatically. However, here are the steps if you want to filter internal traffic or a specific URL from GA: 

1. Sign in to Google Analytics, select the gear icon in the bottom left, and select "Data Streams" 

2. Select your site URL 

3. Under "Additional Settings" select "More Tagging Settings" 

*4a. For filtering internal traffic, select "Define Internal Traffic," and select "Create" 

  • Rule name: Internal Traffic 
  • traffic_type_value: internal 
  • IP Address:
    • Match type: IP address equals 
    • Value: internal IP address 
  • Click "Create" 

*4b. For filtering specific URL traffic, select "List unwanted referrals" 

  • Match type: Referral domain contains or exactly matches 
  • Domain: bot traffic URL 

5. Save

If you want help setting up Google Analytics or need an effective SEO strategy, contact us today!