How to automatically filter spam referrals in google analytics

185 Views Asked by At

There are a lot of very good articles and answers out there that explain (in detail) why we get spam referrals messing up Analytics data. Example results: how to automatically stop spam traffic in google analytics

What I want is a definitive solution...

If you only manage one analytics account, it would not be unreasonable to manually filter suspect domains, but even this is not sustainable. If you, like me, manage over 30 accounts and counting, it gets ridiculous. What is the long term solution?

Analytics data is important for making business decisions.

Is there some service that, like antivirus software, keeps updating its 'definitions' and constantly filters spam traffic?

How can we fight back?

And how can/is it already automated in a one-click solution?

2

There are 2 best solutions below

0
On

Not all spammers are blocked by Google Analytics (only up to 75% of bots can be blocked by google analytics). By adopting the following steps you can automate removing referrer spam:

  • Go to Acquisition>all traffic >refferals and a new window will be opened which shows sources from where your website get traffic
  • In this step select all website who have 0 or 100 % bounce rate and copy it and make a regular expression .the method for making expression is given below
  • Use "\." (escaped dot) between every part of the domain and use "|" (pipe) symbol to separate every link. E.g. consider your blog hits by two spammy URLs "ads123.abc59055xxb896.comtom" and "dd54.xy789z.usjpa" then we made following resultant expression: "ads123\.abc59055xxb896\.comtom|dd54\.xy789z\.usjpa" if you have any trouble in making regular expression then click here to see the complete process
  • Select the add filter option in admin tab and select include and paste the whole expression in the expression field and click on save
3
On

You can try these 2 options to decrease referral spam:

Option 1 - Filter bots

Mark "Bot Filtering" option on on your Google Analytics View Settings. You will need to do it to all of your views

And also create a filter to exclude referral sources. To do this, create a new filter with options:

  • Filter Type: Custom
  • Exclude
  • Filter Field: Campaign Source
  • Filter Pattern: youporn-forum.uni.me|free-share-buttons.com|Get-Free-Traffic-Now.com|event-tracking.com|darodar.com

    --> Also add other spam sources that you have

You can reuse the filter to multiple views. And its also recommended to not apply these filters in your main view. Instead, create a copy of main view and use it to analyse your data.

Its not a permanent solution (you will need to add new spam sources from time to time).

Option 2 - Segment real users

You can also create a segment to filter only users that visited at least one page (it will filter spams):

  • Create a new segment
  • Advanced > Conditions
  • Filter | Sessions | Include
  • Screen Views | per session | > | 0

Then, when you are analyzing your data, use this segment to see only real users.