Weekly Rest
Jouw digitale marketing stop

2 things to set up before you start using Google Analytics

[Dit artikel is voorlopig alleen in het Engels beschikbaar]

header image

Before you start analyzing data with GA you should do 2 things. Create views and tackle spam.

First of all views can help you sort and customize data. They enable you to access important data in a blink of an eye. Besides that, you want accurate analytics. Data that’s “infected” by spam is not solid. Especially data from websites with little traffic could be affected a lot by spam.


Views are essential in GA, they allow you to test and set up different filters and goals easily. To start create 3 views under your new property. If necessary you can add more views later.

Google analytics views

+ create new view + select website + give you view a name + create view


In this view the data has not been modified, it has no configuration (no filters or goals applied to it). It’s your backup in case something went wrong with your other views. You can always extract data from this view if needed.

I personally prefer 2 raw views, one with a spam filter applied and one without (but more about this later in this article).

Once you use, for example, a filter to monitor data for a few days there’s no way back, your data will be altered permanently. Therefore it’s a good idea to test everything you apply in a test view first.

Your master or main view (what’s in a name) is the most important view. It’s used for daily analysis and reporting and is tweaked in order to follow your KPI’s instantly. Since you don’t want to corrupt data in this view, you use the test view to try out new things.
Create a copy of a view:


+ go to the view you want to copy + go to view settings + click copy view + name new view + click copy view

Create a copy of a filter:

First go to the view in which you want to apply the filter.


+ go to filters + choose “apply existing filter”, select the filter you want to add en click add + click save


Unfortunately there are people who want visibility and traffic to their website so bad they’ll do about everything to get it. Also your analytics are exposed to such practices. Referrer spam, originated from fake referrals, can damage your reports seriously. For a detailed approach on how to handle referrer spam in GA I refer to this article, it’s by far the best resource out there on the subject.

Essentially there are two types of referrer spam, ghost spam and crawler spam. Ghost spam has no interaction with your site and is therefore more difficult to stop. Crawler spam on the other hand “crawls” your site but is less frequent because it demands more resources from the spammer.

We are going to create a filter named “valid hostname filter”. The most important thing to do before you create this filter is getting a list of all valid hostnames. This list includes all the places where you put your GA tracking code. For detailed instructions on how to find those hostnames I refer, once again, to the article above. Be aware that these instructions are not suitable for new properties (without data or very few data). In that case I recommend creating two raw views (or two master views), one with the valid hostname applied and one without. This way you can add more domains in the valid hostname later, but you’ll still be able to see data unaffected by spam.

In master view (or test view if you want to test this filter first) you create a new filter.


+ create new filter + name this filter “valid hostname filter” and
under Filter Type choose “custom” + select include + choose “hostname” under “Filter Field” + fill in your domain name under Filter pattern.

You could use a filter for this spam as well, but I find it much easier to drop an extra line of code in the .htaccess file. This file is located in the root folder of your website. Before you start adjusting this file make a backup. Then put in the following code:

RewriteRule .* – [F]

Replace “SPAM SITE” by the spam hostname you want to block.

Feel free to comment below!

Geef een reactie

Je e-mailadres zal niet getoond worden. Verplichte velden zijn gemarkeerd met *