Picture this, you’re on your Google Analytics account looking at the traffic for your website for the last 30 days, you see a HUGE peak on one day and you think wow what was I doing that day to make that happen. You might have put on a short flash sale or an email blast which drove the traffic but if nothing comes immediately to mind and the traffic is way above what you normally expect then you could be the victim of a bot attack. Google Analytics is a fantastic tool but it’s up to you as a business owner or marketer to verify that all the information you receiving is as accurate as possible.
In this article, as part of our Google Analytics series, we are going to explain what bots are, what they are doing showing up in your analytics reports and how you can prevent this malicious, fake traffic from showing in your reports.
What is Spam in Analytics?
The spam you sometimes face in Google Analytics can create a real hindrance to your marketing efforts if not dealt with. It over inflates your sessions making you appear more successful than you are and on the other hand it can drastically impact your bounce rate as most spam visits display as a 100% bounce rate, making your website performance look terrible. There are two different types of Spam, Ghost and Crawler.
Ghost visits are so called because they were never really there. The ghost bot is not visiting your website, they are triggering your Google Analytics code using Google’s Measurement Protocol. With this they are likely using randomly generated codes (UA-XXXXXX) to leave a visit.
These crawler bots, unlike the ghosts, do access your website by crawling through pages of millions of websites and leave what appear to be genuine visits as ‘Referrals’ from a website. Though harder to identify there are a few common signs such as 100% bounce rate, a domain that is spammy sounding (often involving SEO e.g. resell-seo-services.com, auto-seo-service.org), all occurring on one day. If you suspect a refer is spam, make sure you don’t visit the domain that was given directly. Give them a quick Google with a term like ‘auto seo service Google Analytics Spam’, you’ll soon find others who have had the same issue.
What can I do about Google Analytics Spam?
There is no one way to get rid of spam referral but there are plenty of tools which you can utilise in Google Analytics to make your reporting as clean and clear as possible. We use a variety of filters to block this data from our client’s reports and we are going to explain some of the key tricks here.
Before creating any of the below filters in Google Analytics we recommend you have at least 2 views, one where you will apply the filters and a second one that you will leave unfiltered, this will work as a backup and to check the progress of your filters. See our notes in our ‘how to set up Google Analytics Article’ . To create filters, navigate to the view you want to apply your filters to. In our case we’ll use our view named ‘All website Data – Test View’. Select Filters and Add Filters.
Valid hostname filter to stop ghost spam
This is the most effective filter for blocking Ghost Spam and will block all Ghost spam no matter where is comes from.
- Firstly, you need to make a list of your hostnames, for most people this will be their URL with and without the www. (e.g. example.com & example.com) but you may have other urls if you have a more complicated setup such as a third party payment provider(example2.com & www.example2.com)
- Build your hostname expression using your list by separating each hostname with a pipe “|” character (e.g example.com|www.example.com|example2.com|www. example2.com)
- Create the filter.
- Enter the filter name ‘Include Valid Hostname’
- Select Custom filter type
- Select Include
- Filter field should be Hostname
- Add your hostname expression you created in the Filter Pattern text box
- You can verify using the ‘verify this filter’ text
- Once happy click Save
Source Filter to stop Crawler Spam
Crawler spam use the correct hostname so the first filter we created will not affect them. To block it you’ll need a filter that matches 3 known expressions that crawler spam uses. Each of the 3 filters are the same types but with different expressions.
- Create a filter
- Enter the filter name ‘Exclude Crawler Referral Spam’ followed by a number to identify it.
- Select Custom filter type
- Select exclude
- Filter field should be Campaign Source
- Add your crawler expression as stated below
- Once happy click Save
- Crawler Expressions
Crawler Expression 1
Crawler Expression 2
Crawler Expression 3
These two filters won’t block all spam bots but it will go a long way to clearing up your Google Analytics reports. The Include Valid Hostname Filter will block all Ghost Spam and the Exclude Crawler Referral Spam filter will remove are large amount of the known Crawler traffic that affects the industry. We hope to keep these filter parameters up to date as bots get smarter and the filters need to change but this is the best solution as of writing.
See more in our Data reporting series and if you are finding this all abit much you can get in touch and we will help you sort your data collection out. 0345 200 26 50 or email firstname.lastname@example.org