Block spam referral traffic in Google Analytics

I was so excited this week when I opened Google Analytics to look at our stats. The graphs of users and sessions were both trending up. When I looked into where that traffic was coming from, I saw a huge spike in referrals. Bingo! I’ve been working on generating some inbound links, so I was feeling pretty pleased with myself.

And then I looked at what site specifically was sending the traffic. Rank-checker.online is the culprit. I’m not using the word culprit ironically; the url redirects to RankSonic, a black-hat SEO agency.

Sites like RankSonic direct fake traffic to your website. Sometimes they bypass your site altogether, just sending signals to Google Analytics. This is called “Ghost Spam”. They do this for two reasons: to get you to visit their site (which I did), and to create backlinks to their site off your website’s access log.

The fake traffic likely isn’t going to cause any real damage, although in rare cases it can use up your site’s bandwidth. The most annoying part of the whole thing for marketers is that it’s messing up our data!

Luckily, there’s an easy way to block the fake traffic from Google Analytics:

  1. In your GA account, click Admin in the top menu.screen_shot_2016-03-24_at_10-03-08_am-599973-editedscreen_shot_2016-03-24_at_10-03-08_am-599973-editedscreen_shot_2016-03-24_at_10-03-08_am-599973-edited-1
  2. In the third View column, select Filters, and then click + Add Filter.
  3. Name your filter something that demonstrates how much revenge you want to take on the people who would mess with your precious graphs.
  4. Define the Filter Type:
    • Select Custom.
    • Under Filter Field, select Campaign Source.
    • In the text box under Filter Pattern, paste in the domain you want to exclude. In this case, “rank-checker.online”.
  5. If you’d like, you can verify the filter. GA will show you the approximate number of sessions that will be affected by applying the filter.
  6. Click Save!

You can also remove the Ghost Spam from your existing reports:

Although you’ve blocked future fake traffic from hitting your dashboard, the filter doesn’t remove data that’s already been recorded. Unfortunately, there’s no way to actually delete the data. But you can remove it from your view by creating an advanced segment that uses the same filter:

  1. In your GA account, click Reporting in the top menu.
  2. In the sidebar, select Acquisition, All Traffic, and then Referrals.
  3. In the top of the report, click All Users.
  4. A new panel will drop down; select + New Segment.
  5. Select Conditions.
  6. Name your segment something that reflects your wrath. Or something that indicates to your team that this is a filtered segment.screen_shot_2016-03-24_at_10-25-35_am-797268-edited
  7. Define the condition:
    • Change Include to Exclude.
    • Change Ad Content to Medium.
    • Change contains to exactly matches.
    • In the text box, select referral.
    • Click AND at the end of the condition box.
  8. Define the second condition:
    • Change Ad Content to Source.
    • Change contains to matches regex.
    • Paste in your filter domain again: “rank-checker.online”.
      The summary graph on the right side of the screen should adjust to tell you what percentage of your users will be affected.
  9. Click Save.

Well, my graphs don’t look nearly as impressive anymore, but they’re still trending up, and now they’re accurate. I’ll take it!