Martech hub

What is referral spam and how to prevent it in less than 5 minutes?

Do you see fake referrers in your Google Analytics account? So did we before sorting it out.

Some people found a new annoying way to spam you, sadly. They are spamming your Google Analytics with fake referrals to lure you to their sites. This is why we call this "referral spam".

Have you seen referrals like lifehacĸer.com/new-revolutionary-shell-from-lifehacĸer.com, reddit.com/r/technology/comments/5foynf/lifehac%C4% B8ercom_original_idn_fake_safe_best_on_ff/, site-auditor.online/, floating-share-buttons.com, 4webmasters.org, traffic2money.com, trafficmonetizer.org, get-free-social-traffic.com, satellite.maps.ilovevitaly.com, free-social-buttons.com or site5.free-floating-buttons.com, to name a few?

If you saw some of those in your reports, well, they are fake.

And this is just a subset; there are hundreds more hitting us every month. If you thought you had a sudden spike of popularity, I’m sorry but that might not be the case. What they are trying is this: they want you to visit those referrals, which will redirect to something they want to sell to you.

This is something a lot of our new customers using our email reports for Google Analytics realize once they get their first few reports. They suddenly realize that a good chunk of their traffic is fake traffic.

We fixed that for a lot of our customers over time.

Why is it bad? It breaks your conversion rates and all your metrics.

Section linkHow to fix it

We have 5 minutes to fix this, so let’s do this! The flaw of this spam is the following: the hostname associated with them in Google Analytics is not valid. In general, it’s not set at all but sometimes it’s just a fake hostname. If it was not from this spam, the hostname should, in theory, be the hostname of your website.

Let’s talk about a real-life example, our marketing site, which at the time of writing was metrics.watch. Here is the list of some of those fake referrals we are having in our unfiltered data:

spam-example

And here are some of the hostnames logged for them:

hostnames

As you can see in this sample, this is NOT our website’s address. It should be "metricswatch.com", nothing else. Luckily, there is an easy fix.

If you don’t have more than one view for this property in Google Analytics, now is the time to create a second one. This is really important or you could break all your Google Analytics data quite easily . To do so, assuming you are already in that property on Google Analytics:

  • go in the admin section (top menu)
  • you should see 3 columns, in the third column, click on the currently selected view, in our case "Marketing (master)"
  • you will see a drop-down, click "Create new view" which is the last option
  • give it a name and set the country and timezone

After creating it, you will be redirected to the main admin screen again, but with the new view selected.

  • Click on "Filters", then the "New Filter" button
  • Add a name for the filter

Luckily, the Google Analytics folks came up with a set of predefined filters you can use. To remove this spam, select "Include only", then "traffic to the hostname", and then an expression that fits your case. In our case, we used "that are equal to". Here is what it should look like:

new-filter

This is in the case you have only one domain. In some case, it’s a bit more complex but this will cover it for most people.

Beware, do not do that on the main view, you should always keep an unfiltered view with all your raw historical data.

If you have historical data on that view (i.e., it’s not a new view), you can use "Verify this filter" to see what it looks like now and what it would look like with the filter. Save it and boom! We’re done!

It’s important to note here that new views will be empty until there is new traffic, no historical data will be copied over in new views, and if you already had another view, the filter will only apply to new data.

Hope that helps!

Start sending automated reports today

Start your free trial, no credit card required!