Blocking spam

Bot Battles: Getting Accurate Google Analytics Reports

500 450 Breathe Marketing

Blocking spam

It was all so beautiful in the beginning.

Your website went live. Then you set up Google Analytics and started checking your reports, getting great information about your customers, how they were using your site and where they were coming from. You were able to use this information to improve your site. And your website traffic was really starting to increase. Fantastic!

But then you noticed something strange: while the number of sessions and users were going up, your time on site and page view averages were dropping and your bounce rate was going up. Way up.

So now when you look at where your web traffic is coming from, you notice that you’re getting a lot more referral traffic . . . and you don’t recognise most of the domain names.  Names like,,, and are showing up in your sources and throwing off all your stats.

What the heck is going on?

The bad news:  it’s referral spam bots

Referral spam (a.k.a. referrer spam, log spam or referrer bombing) shows up in your website traffic reports appearing to come from a link on another website. However, the link is actually false and the domain of the website may also be fake.

Why would someone do this?

There are several possible reasons. Just as with email spam, the people initiating this trash are trying to get you to click on something in the hope of getting you to make a purchase, boost their own site rank by getting more visits, or – worst case scenario – bring malware or viruses into your computer.

In addition to being highly annoying and malevolent, these hits on your site ruin your traffic stats, because the “visitors” aren’t real people interested in your products and services. They spend about one second on your site and leave, which causes your traffic stats to go up falsely, your time on site average and page views to plummet and your bounce rate to go through the roof.

The good news: you can do something about these

You’re not alone in battling the bots. There are more spammers showing up all the time and most companies are seeing them in Analytics reports. Plenty of people are frustrated, so chances are that at some point, Google will find a way to put in a permanent block at the data collection level.

In the meantime, if you have a site built in WordPress, you can block crawler spam by downloading a plugin to help block bots. You can also add code to your .htaccess file. Editing code is more involved, and if you do it wrong it can cause real problems, so make sure you work with your web developer for this option.

For ghost spam, you need to use a filter (or segment) in Analytics to block hosts that aren’t yours. There are a few ways to do this, but the easiest we’ve found is to go into the Admin section in your Analytics account and click on Segments under Personal Tools & Assets. Click on New Segment, then click on Conditions.

Create a name for your segment at the top (like My Hosts). Under Conditions, choose Hostname under Behaviour and use the drop-down menu to select “matches regex”. Put your cursor in the box on the right. You should see your domain name (like show up as the first option. You’ll also see options with strange letter mixes – these are what we want to block, so leave them alone and click the blue Save box up at the top. Now you can choose this segment when viewing your reports to show more accurate visitor information.

Setting up a segment

Setting up a segment 2

Note: This filter doesn’t actually stop the bots from “hitting” your site, but it helps give you a more accurate report. A few bots may still sneak through, but you can usually do a quick removal of them once you look at your referral traffic.

Can’t I just ignore all this stuff?

You can, but you won’t be getting accurate metrics about your true visitors and customers, which means you won’t have the tools necessary to make informed marketing decisions.

Need some help blocking spam or your setting up filters for your Google Analytics reports? Contact Breathe Marketing today.


Anna Nixon-Smith

All stories by: Anna Nixon-Smith