Google Analytics Filtering Out Ghost Referrals

Why?

You may be under the impression that you're getting more hits than you actually are and this article will show you how to fix that. No reason to keep living in a fantasy world!

Quick HowTo

First go the the Admin section and choose the Account and Property you'd like to apply the filter to. Then create a new view like "example.com (Ghost Referalls Filter)". Trust me on this create a new one and don't reuse your existing one. I'll explain later.

Add a new filter to your freshly created view. Then select the Custom tab, mark the Include radio button, and choose Hostname from the dropdown. Then you'll want to enter your sites hostnames separated with the OR operator "|" and make sure to add a backslash before each period. This will white list only your hostnames and block any other sites from sending fake data that muddy up your Analytics reports.

Example entry example\.com|www\.example\.com|translate\.google\.com

alt

The last hostname in the above example is for people that use Google Translate to view your site. You might have other hostnames you want to include in this white list. To make doubly sure you can review all the hostnames that access your site by going to Audience > Technology > Network and selecting Hostname as the primary dimension. You will also want to set a long time range in the calendar maybe a year or more to get a richer report. From this list you can cherry pick anything that looks like it is a legitimate source and add it to your whitelist.

So Why The New View?

If you add a filter to an existing view it will permanently change that view and all of the past data. This can be very bad especially if you mess something up the first time around. And secondly you might still want to be able to view the total unfiltered data that is coming into your site. You can even compare the two and see how many referrals are fake.

My New View Has No Data!

That is to be expected. Unfortunately Analytics doesn't apply filters to past data. So all of the data in the filtered view will be from the day it was assigned onwards. Just give it a few days and you'll be using your original view less and less.

In Closing

I got my information from this article https://megalytic.com/blog/how-to-filter-out-fake-referrals-and-other-google-analytics-spam and he got his info from yet another article. So check out those ones too if you want to learn more around the subject.