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.
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.
Once you’re there, add a custom dimension called “User Agent” and set the scope to Session level.
Make sure to take note of the Index Number. You’ll need this in Step 3.
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.
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.
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:
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:
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.