Guide to clean and reliable Google Analytics account

Having Google Analytics installed on your site is great. It’s great first step! You have the basics to be able to track how is your online business doing.

But that’s not all you need. You need to configure a few things in Google Analytics to make sure you can trust what Google Analytics’ telling you with its data.

This guide will show you how to make sure you can trust Google Analytics.

It was written in the first place to help the Metrics Doctor users. Metrics Doctor is our free tool to detect bad data, fake traffic and spam in Google Analytics. Check it out, it’s free! 🙂

This guide is useful even if you don’t use Metrics Doctor.

Follow the guide!

Accounts, properties & views

Before diving into best practices and tips, and it’s important to go over some Google Analytics vocabulary.

When you get in Google Analytics, you see a hierarchy of “things”. Let’s define those things.

Here is what it looks like for Metrics Watch’s Google Analytics account:

The first and top level in the screenshot (“Metrics Watch”) is what we call a Google Analytics “account”.

An account, like “Metrics Watch”, can have one or multiple “properties”. Typically a property is a website or an application. This is the level where your Google Analytics tracking code sends the data.

Finally, the last level is the view level. This is the level where you consume the data. All the reports you look at, are for a specific view. By default, all properties will have a view called “All Website Data”. As you can see in the screenshot, you can add more views. More on that later.

To recap, “accounts” are pretty much a way to organize all the sites you have. A property is a site or application and this is where your data is collected by your tracking code. Finally, we use views to visualize the data with the various reports.

What are view filters?

We just learned that when we look at reports, it’s for a specific view. The typical reason to have multiple views is that you will have different data.

We collect the data on the property level, so how can we have different data in different views from the same property? Filters.

So, how can we filter data? Let’s go with an example that will make it crystal clear for you.

One of the most typical reason to have a filter is to remove the data from your computer or your office. You don’t want your visits to be part of the data, as it will change the conversion rate, bounce rate or average session time, for example. It’s not a huge deal if you have tens of thousands of visitors per day or more, but it can definitely influence your reports if you have few people on your site.

Filters are how you can prevent some data to get in your Google Analytics views. You can create those rules and decide to apply them to a specific view or multiple views. At the moment you apply a filter to a view, it starts collecting data with your filter. Your data from the past will not be changed. It is NOT retroactive.

We will give you more example of what you remove from your data in the later sections.

 

Best practices for “views”

By default, every property comes with a view called “All Website Data”. The fact that applying or removing a filter is not retroactive forces to have certain practices regarding views.

For that reason, we want to have 3 views instead of just the default one. I usually name those views “raw”, “test” and “master”.

Why and what are their roles?

  • raw: this view should never have any filter applied. That way, if we screw up things on other views with filters, at least there is some way to get the data we need.
  • test: when we create filters, we’re never 100% sure of the effect. We might have a bad configuration or even just a typo that makes it ineffective or worst, that prevents data collection on a view. You don’t want that to happen; this is why we have that test view. You apply your new filters on this view first, wait a few days and compare the data between the test view and master view to see if the filter is doing its job properly.
  • master: once you confirmed your new filters are working, you can now apply them to your master view. This is the view that you will use on a day to day basis for your reporting needs. It contains only the data that’s relevant and that you can trust.

To get there, you will need to create new views.

When you create a new view, you need to be aware that any configuration tweaks that you did on your current view will not be copied to your new views. An example of that is your Google Analytics goals: they are defined on a view.

What is the next step? Rename your current view and create the missing views.

What should your current view become? It depends.

  • If you don’t have any filter or goals, I would recommend renaming it “raw”.
  • If it has filters or goals and you’re very confident that your filters are doing their work, you could rename it to “master”.
  • If you’re not 99% sure of your filters and have no goals, you should rename it to “test”.

Renaming your view

To rename your view, you need to go in the admin section of your Google Analytics account. Look for the “Admin” button at the bottom left of your screen. It should look like this:

Click on it. You will then see a three column layout, with your account, property and view selected. Something like this:

Make sure that the right account, property, and view that you want to rename are selected. If that’s not the case, use the drop down menus to select it.

Once you have the right view selected, click on the “View Settings” button. It’s the first item of the “View” column. Change the “View Name” to fit its new name, scroll down and click on the “Save” button.

We’re done for that. Stay on this screen; we will use it to create the other views.

Creating new views

We just renamed a view, now’s the time to create the missing views. It means you should be on that screen again:

To create a view, click on the third drop down menu. Once it’s opened, you will see a “Create new view” at the bottom of it.

Choose a name for your view, your country and time zone. Make sure it’s the same than our other views. You can see that in the “View Settings” of a view.

Once you’ve set your name and time zone, you’re done. Just click “Save”.

Repeat that for all the views you need to create. Once you’re done, you should have views named “Raw”, “Test”, and “Master”.

Spam or ghost traffic, in Google Analytics?

Yeah, sadly, there is spam in Google Analytics. It’s often called fake traffic or ghost traffic. How is that even possible you ask me? It’s actually pretty simple.

The tracking code you install on your site is similar to all other tracking code, besides one thing: the tracking ID. There are people who are sending fake data to random tracking IDs.

Why do they do this? For some people, it’s to trick you in wondering what your data is and getting you on their site to sell you something. For others, it’s unclear as there are no obvious reasons.

 

 

Referral spam

The most common form of spam is referral spam. The symptom of that is that you will see referrals that don’t really exists or at least do not link to your site for real.

You can find referrals in the “Acquisition” section of your Google Analytics:

Here are a “few” examples of referral spam:

  • reddit.com/r/technology/comments/5foynf/lifehac%C4%B8ercom_original_idn_fake_safe_best_on_ff/
  • lifehacĸer.com/new-revolutionary-shell-from-lifehacĸer.com
  • addons.mozilla.org/en-US/firefox/addon/ilovevitaly/
  • thenextweb.com/contributors/a-russian-trump-fan-is-celebrating-by-hacking-google-analytics/
  • motherboard.vice.com/read/this-pro-trump-russian-is-spamming-google-analytics
  • motherboard.vice.com/en_us/article/google-wins-legal-battle-against-pro-trump-spammer-over-the-letter-g
  • reddit.com/r/technology/comments/5e2kcf/heres_a_secret_%C9%A2ooglecom_is_not_googlecom/
  • 57563720-1.compliance-irvin.xyz/
  • boltalko.xyz/
  • bukleteg.xyz/
  • webmasters.stackexchange.com/questions/101473/message-secret-%C9%A2oogle-com-showing-in-google-analytics-language-column/
  • buketeg.xyz/
  • 57563720-1.compliance-alex.xyz/
  • 57563720-1.compliance-don.xyz/
  • 57563720-1.compliance-alexa.xyz/
  • 57563720-1.compliance-andrew.xyz/
  • brateg.xyz/
  • bezlimitko.xyz/
  • arendovalka.xyz/
  • begalka.xyz/
  • budilneg.xyz/
  • alfabot.xyz/
  • bezlimitko.xyz/
  • site-auditor.online/
  • website-analyzer.info/
  • traffic2cash.xyz/
  • traffic2cash.org/
  • boost-my-site.com/
  • slow-website.xyz/
  • eu-cookie-law-enforcement-6.xyz/
  • share-buttons.xyz/
  • free-traffic.xyz/
  • eu-cookie-law.blogspot.com/
  • social-widget.xyz/
  • santasgift.ml/
  • how.to.travel.and.make.money.with.maps.ilikevitaly.com/
  • ranksonic.net/
  • quit-smoking.ga/
  • biteg.xyz/
  • cookielawblog.wordpress.com/
  • unpredictable.ga/
  • black-friday.ga/
  • com.slack/
  • website-stealer.nufaq.com/
  • cyber-monday.ga/
  • getlamborghini.ga/
  • ghostvisitor.com/
  • trafficgenius.xyz/
  • budilneg.xyz/
  • begalka.xyz/
  • arendovalka.xyz/
  • search.f-secure.com/
  • vc.ru/n/google-russian-spammer
  • petitions.whitehouse.gov/petition/petition-ban-googles-blatant-suppression-free-speech
  • google-liar.ru/

How can we fix this?

The good part of this form spam is that most spammers aren’t that smart about how they spam and their fake traffic is easy to detect. When there is legit traffic, with every page viewed on your site there will be something sent to Google Analytics, and it will include the URL of your site as part of it. It’s called a “hostname”. Fake traffic won’t include your site’s hostname but either be empty or be some random stuff.

Which means we can remove that spam with just one single filter. We have been using this filter for years and it’s been working great.

Let’s create it for you. You should be creating this on your test view (see the previous section called Best practices for “views” if you’re unsure).

To create the filter, you need to go in the admin section. Click on the “Admin” button at the bottom left of your Google Analytics screen. Once you’re on those three columns (see screenshot below), make sure your “Test” view is selected.

Click on the “Filters” item in view options. It looks like this:

Click the “Add filter” button.

You first need to give it a name. I typically name this filter “valid hostname only“.

Now there are two options from there:

1. You have only one website, with one domain. If this is your case, then here is how you should create it:

You select “Predefined”, then “Include only”, “traffic to the hostname”, “that are equal to” and finally you add your domain in the “Hostname” form entry, instead of “www.example.com”.

2. You have more than one domain. For example, you could have www.example.com and shop.example.com or app.example.com.

This one can be a bit more tricky. If all your subdomains are under the same root domain, let’s say “example.com”, then it’s pretty easy. From the previous step, just change “that are equal to” to “that end with” and set your root domain in the “Hostname” field. This would make all data from shop.example.com, app.example.com or whatever.example.com work perfectly fine.

Now, if you have multiple root domains. This is our case at Metrics Watch. We have the main site (metricswatch.com) then the app which is on app.metrics.watch. So we need something a bot more fancy like this:

 

I recommend going with the simplest option you can. Remember to create this on your “Test” view first. You can apply it to your test view after validating that it works for you by comparing the reports of the “Test” view vs the “Master” view.

 

 

Language spam

This is a similar form of spam than the referral spam. This is much less common. There was a spike of that form of spam in November 2016.

How can you recognize this type of spam?

When you go see in Google Analytics the languages of your visitors, you can see a list of languages. Usually, they are 2 or 5 characters long. But what happens when you are affected by this type of spam is that you see weird things among the languages listed. Things like “Secret.ɢoogle.com You are invited! Enter only with this ticket URL. Copy it. Vote for Trump!” or “o-o-8-o-o.com search shell is much better than google!“.

See for yourself:

Some of the language spam is removed by the filter we created in the “Referral spam” section, but not all.

To filter the language spam, we need to create a filter.

You should be creating this on your test view (see the previous section called Best practices for “views” if you’re unsure).

To create the filter, you need to go in the admin section. Click on the “Admin” button at the bottom left of your Google Analytics screen. Once you’re on those three columns (see screenshot below), make sure your “Test” view is selected.

Click on the “Filters” item in view options. It looks like this:

Click the “Add filter” button.

You first need to give it a name. We typically name this filter “Language Spam“.

Here is how you should create it:

Here is the filter pattern for you to copy:    .{12,}|\s[^s]*\s|\.|,|\!|\/

This will prevent any traffic with a language that has 12 characters or more, or with some illegal characters, to be collected. It’s been working fine for us for a while. You can make it more drastic if you want, but we prefer to filter a bit less than too much and adjust over time if needed.

Apply an existing filter on a different view

You added a filter or two at your “Test” view and know it works as you expect? Amazing. You’re now ready to apply it to your “Master” view.

To do so, go to the admin section of your property and select your “Master” view. Click on “Filters”.

Now, a little bit of important information. Filters in Google Analytics are created on the account level, not the view level. We apply them on views, but all the views of an account are sharing the same filters; we just apply them to the views we want.

Earlier in this guide, we created new filters. To apply a filter to a view, you then need to click on “Add filter”. You need to select the “Apply existing Filter” option. You will be shown a list of available filters, which is a list of all the filters of your account, besides the ones applied to your view. You can just click the ones you want to add, and click the “Add” button, then save.

💥

You’re done. Your view now has more filters.