
Small businesses and marketing agencies alike both rely on numbers for pretty much everything they do. When it comes to any digital marketing efforts, it's important to use some sort of analytics platform like Google Analytics, KissMetrics, Clicktale or Crazyegg. The most widely-used analytics platform is Google Analytics, not only because it's free (but does have a premium version) but because it's made by Google, the network that most marketing agencies consider the highest priority over the other two search engines, Bing and Yahoo.
Before I make any marketing decision, I always look at the numbers. Numbers don't lie, but in the case of Google Analytics they can be extremely deceiving because of something called "Referral Spam." While this post will not go into specifics of how referral spam comes about and the technical details behind it, it will show you how to filter it out. It's very important to note that the below method does not stop the referral spam data from getting into your analytics, it just allows you to separate the real data from the fake data.
First let's take a look at a client of ours who utilizes a variety of our legal marketing services from SEO for lawyers, video marketing and social media. His Google Analytics data for the past year looks like this:

At first glance, this data looks amazing! Almost 75,000 sessions and 60,000 unique users. But where are these users coming from? To find out we can check the referrers by going to Acquisition --> All Traffic --> Referrals. For this same client during the same time frame as the above data, here are their top sites that people are coming from:

For these top 10 referrers, 9 of them are referrer spam (also called ghost spam.) They hold no value to a business and skew a significant number of other metrics in Google Analytics. Just these 9 referrers alone generated a total of 32,519 sessions. All of these sessions are fake. Since most business decisions are influenced by metrics and KPIs like those in Google Analytics, not filtering out this fake data can lead to making decisions that can significantly hurt your business.
So how does one filter out bad data and remove referrer spam?
Removal of referral spam can be done through the use of 'Segments' in Google Analytics. By applying a custom segment, you can historically remove the bad data and be left with the data that is coming from valid sources.
The creation of the segment involves using RegEx (learn about RegEx here) filters set to exclude entries where the Medium exactly matches 'referral' AND the Source matches the spam site. New referrer spam entries are being created all the time, so it's a constant game of cat and mouse. To simplify this process, I have created a Google Analytics segment that is public in the Google Analytics Solutions Gallery which I update regularly with new referral spam sources. You can see these segments by going to the Google Solutions Gallery (have to be logged in to the Google account you use for your analytics) and using the search query "author:"Andrew Wasyluk"

Importing and Applying Segment into Google Analytics
Once you've imported the segment, you can apply it to any view across any analytics property that you manage. If this segment was applied to the client which was used as an example at the beginning of this post, there is a significant difference between all the data which is displayed upon login and the data displayed with the referral spam segment applied.

As you can see, there is a huge difference between what the data showed before the segment was applied, and what the real data shows after the referrer spam segment is applied.
Written by Andrew Wasyluk. Andrew is a social media specialist at Page1Solutions.