If you’re the type of person who checks your website Google Analytics often you might have noticed a spike in traffic at the end of January or early February.
The first thing to know is that this is spam. It was added by several thousand bots coming from different IP addresses. This could throw off your entire analytics & reporting system, so let’s see if we can prevent this type of spam moving forward.
Create an Unfiltered View in GA
One of the best features of Google Analytics is that you can setup multiple views. Each view gets the exact same data but you can filter out different pieces of that data. There’s several great things about views.
One of them is that you can create an Unfiltered view. This will be your backup view that collects all data.
Knowing you have an unfiltered view then it’s time to create one or more views that removes any unimportant data. I actually have 3 views. The unfiltered view, my master view, and a test view for experimentation.
On my Master view with my filters – I remove prevent a whole bunch of data from coming in:
- My home IP address
- An IP address I often work from
- And a few types of spam I’ve seen in previous years
Setting Up a Filter in Google Analytics
We’re going to do all of the work today in your non-unfiltered view – in my case I call that the Master view.
Here’s how we setup the filter:
- Go to Admin -> Filters
- Click Add Filter
- Configure the filter
- Give the filter a descriptive name like “2021Q1BotSpam”. I would avoid names like “bot spam” since a few years from now there might be new type of bot spam.
- Filter type: Predefined
- Exclude | traffic to the subdirectories | That are equal to
- /trafficbot.live|/trafficbot.life|/bot-traffic.icu|/bot-traffic.xyz – you may only see one or two of these in your analytics. But if you look at the event globally you can find these four directories. You might as well block all of these
- (Optional) “Verify this filter”. Feel free to verify the filter if you wish. I’ve seen others use these exact same filters and they don’t verify.
Here’s what it should look like when it’s complete.
Once you’ve done this, the filter is saved and any future data from spam bots will be ignored in this view. If for any reason you messed up, you have your Raw / Unfiltered view which you can reference.