Skip to content
Article

How to Exclude StatusCake Bots from your Analytics

At Atlantic BT, we use Google Analytics as our primary analytics platform and StatusCake to monitor our page speeds, load times, and site performance. One day, I noticed something was a little off.

StatusCake claims not to load the Google Analytics scripts, but what did we see after turning on the service? A steady stream of direct/none, 1 page per session, 100% bouncing, 0 second time on site visits to the homepage—clear evidence of their bot messing up the traffic! At the same time, StatusCake was still tracking in Google Analytics.

Statuscake Google Analytics

 

 

I speculate that this could be because our analytics script is executed through Google Tag Manager, and may be skipped by their “excluding analytics script” logic.

To be safe, I tried doing a Google search. Surely this was happening with other websites. When I looked through the results, I found nothing other than articles from StatusCake itself saying I didn’t need to do anything at all to exclude them from Google Analytics. I knew that was wrong. Anyway…

…Here’s How I Fixed It:

I found that, by creating a User Agent variable in Tag Manager and pulling it into analytics as a custom dimension, you can single out StatusCake’s User Agent and exclude it from your view. Here are 4 easy steps to exclude StatusCake bots from your analytics:

Step 1:

Create the Custom Dimension in Analytics

Once you’re in Google Analytics, you need to create custom dimensions. Custom dimensions can be configured in the admin area, under property settings.

statuscake2

Once you’re there, add a custom dimension called “User Agent” and set the scope to Session level.

statuscake3

Make sure to take note of the Index Number. You’ll need this in Step 3.

Custom Dimension Index Google Analytics

 

Step 2:

Create a User Agent Variable in Tag Manager

Next, go over to Tag Manager and create a new Javascript variable with the Global Variable Name of navigator.userAgent.

statuscake5

Step 3:

Update Analytics Tag to Pull in User Agent

Remember that Index Number you noted in Step 1? Now you get to use it. Go into your general Analytics tag. Under More Settings → Custom Dimensions, add the dimension number from analytics to the index field, then add your new {{User Agent}} variable in the Dimension Value.

Tag Manager Custom Dimension Analytics

 

Once you’ve done that, be sure to save and publish!

Step 4:

Exclude Bots!

Now, User Agent data will be pulled in as a dimension in Analytics. To exclude StatusCake, make a filter that looks like this:

statuscake7

Now you can revel in your accurate, uninflated metrics once again.

BONUS: 

Make a Custom Report!

This simple report is a good way to quickly identify other bot user agents. Look for repeat visits, 100% bounce rate, no time on site and one page per visit. These are likely bots you can exclude. To make one yourself, apply this report to your analytics profile:

User Agent Google Analytics Report

 

And you’re done! Once you go through these steps, you can prevent those annoying bot hits from messing with your data. If you want further help with your marketing campaigns and the monitoring of it, Atlantic BT is here to help. Our marketing experts can help you with automation, personalization, marketing analysis, and provide performance reports to help you grow even further. Be sure to contact us to get started.

The Atlantic BT Manifesto

The Ultimate Guide To Planning A Complex Web Project

Insights

Atlantic BT's Insights

We’re sharing the latest concepts in tech, design, and software development. Learn more about our findings.

Questions & Answers

How much does custom eCommerce cost?

A custom eCommerce store could cost anywhere from $12,000/year to millions. Variable factors include the amount of custom features, the complexity of design, setup investments, training, and maintenance. Check out how to determine the cost of a custom eCommerce store.

Learn More about How much does custom eCommerce cost?
What is the best web development framework?
Many people commonly ask “what is a framework in web development?” Web development frameworks can easily be confused with web development tools, languages, or parts of the web development stack (like .NET, PHP, JavaScript, or Ruby).
Learn More about What is the best web development framework?
What is the best programming language for web development?
If there was one “best” programming language, then everything else would be obsolete. The reality is that there are so many different programming languages because there is no “best” language for any situation.
Learn More about What is the best programming language for web development?
How much does web development cost?
Web development can vary from a few hundred to millions of dollars depending on what is needed. You may simply need some changes to something that already exists, or you'd like to build a large or complex application.
Learn More about How much does web development cost?
What is web design and development?
People often lump web design and development together, so what's the difference? As the Internet has evolved, the skills required to produce a high quality website or web application have changed.
Learn More about What is web design and development?
What is JavaScript used for in web development?
Historically speaking, JavaScript was only commonly but sparingly used in web development. The multiple browsers in use at the time each supported different versions of JavaScript and were slow to render more complex Javascript.
Learn More about What is JavaScript used for in web development?
What is React web development?
React is a popular JavaScript library. It is primarily used for building interactive user interfaces (UI).
Learn More about What is React web development?