Google Analytics: Guide to getting the most out of ‘GA’ – views and filters

If you’ve read previous Optimisey blog posts like my guide to getting on Google My Business or the ‘How To’ for Bing Places you may be expecting a simple, step-by-step walk-through for how to set-up Google Analytics for your website.

— This post is part of my Google SEO Guide series

If you’re not a returning reader and this is your first time on Optimisey “Hi! Welcome!” returning users (you guys are the best) – I’m going to surprise you.

Google Analytics is so fundamental and simple, I’m not going to do a step-by-step to setting it up. Sorry.

In this instance, Google actually do a pretty good job of it themselves – so if you haven’t got it installed in your site, bookmark this page (or Tweet it to yourself or whatever) go read that, get it set-up and then come back here.

What this piece is going to be about is what to do after you’ve set-up Google Analytics – some hints, advice and Google Analytics tips to get you started and which, the earlier you get them set-up the better.

When I started writing this I had it planned out as one piece – but it turned into a bit of a monster, so I’ve decided to split it into two.

This one will focus on setting up Views and Filters with examples of the two fundamental things I do when setting up Google Analytics on any website.

The second one focuses on how to create goals in Google Analytics and Content Groups too. Need them? Read that.

Google analytics: The basics

A black and white photo, from Missouri State Archives, of a car tipped sideways, driving on two wheels
You can bet this driver didn’t have their eyes on our Google Analytics tips | Image: Missouri State Archives

I should start by confirming that Google Analytics is not the only web analytics software out there. It’s not even the only free one.

Again, alternatives to Google Analytics is not the aim of this piece. If you’re looking for alternatives to Google Analytics that article from Search Engine Journal is a good place to start.

It’s a few years old (2014) and not all the alternatives are free but it’s useful to know other options like Adobe Analytics, Clicky and Piwik exist.

I’ve worked almost exclusively with Google Analytics throughout my career, so I’m going to stick with it – certainly for the duration of this blog – but whatever analytics package you prefer, get one. Any one.

And no, the stats data you get on your free WordPress blog is not the same nor sufficient.

Some form of analytics is an absolute must for any website. The adage of “if you can’t measure it, you can’t manage it” fits well here.

A website without analytics is like driving with your eyes closed.

Sure, you may get to where you’re going – but even if you do, you’ll never know.

The stats you get with a free WordPress blog… maybe you have one eye half open, but you’re also looking down a long toilet roll tube – with a very narrow view.

Careful now… get a back-up in place

One of the first things I do when setting up Google Analytics on a website is set-up a second view.

This screenshot from the Admin panel shows where to do this:
A screenshot from the Google Analytics admin screen (2017) showing where to add a new View

As you can see in the example for this site I’ve got two views already called “All Web Site Data” and “Reporting view”.

The All Web Site Data is my fall back, the safety net. I don’t do anything with this View once I’ve got it set-up.

When you start adding filters, Content Groups, segments, Goals, Custom Definitions (some of which I’ll cover in this post) – you start messing with your data, sometimes even before it’s collected by Google Analytics.

You may well want to do that – but often once you do it you can’t undo it. Mistakes are easily made.

It pains me to admit but I once set-up a filter to screen out colleagues working in a satellite office… and did it wrong.

I collected all the IPs, wrote some lovely regex… and then set the filter to “Include only” instead of “Exclude” – so for two days (until I discovered my mistake) we collected only the traffic from that satellite office.

With an untouched “All Data” view set-up you always have somewhere you can go back to view any data you may have accidentally missed, filtered or otherwise messed up.

got your Eyes open? stop looking at yourself

I hinted at it there but the next thing I do is, in the “Reporting view” (you’ll never guess what I use that cryptically named view for!) I add a filter to exclude myself – or more importantly me and all my colleagues or all the staff that work for that company.

You can set-up a filter by tapping Filter from the admin menu (make sure you pick the right view in the drop down first!):

Screenshot from Google Analytics (2017) showing where to add a Filter to a view

The next screen has a big red “Add Filter” button, so I’ll spare you the screenshot of that.

A quick check before we go on – make sure you really want to filter out all your staff/colleagues traffic. Yes, when your bloggers are reading and re-reading their own blogs over and over you don’t want that skewing your traffic figures. Or your dev team may be checking the site constantly, monitoring things etc. You don’t want that inflating your figures either.

However, if it’s possible your staff are also your customers, you probably don’t want to filter them out. Filters are pretty blunt instruments. You could probably write a filter to exclude ‘Dave from accounts’ – but that’s a bit beyond the remit for this blog.

Let’s crack on with the basics.

First option is Create New Filter or Apply Existing Filter – you want the first one of these for this example. Then you get to pick a filter name. Make it something blindingly obvious – so anyone that comes after you can see easily what that filter is doing.

A crucial detail, which I always try to put in the name, is what the filter is doing. Is it including or excluding? So for my example I’ll call it “Exclude Optimisey Cambridge office”. Catchy eh?

Next up you pick Predefined or Custom. The latter is a bit complex (and a route to wrecking your traffic if you don’t know what you’re doing) so we’ll skip that one for now. Stick with Predefined.

The next dropdown, Select filter type is where you pick Exclude or Include only. Choose carefully!

Select source or desination has four options: traffic from the ISP domain; traffic from the IP address; traffic to the subdirectories; and traffic to the hostname.

If that all seems a bit jargon-y, it is. Let me try and simplify it a bit.

Traffic from the ISP domain

ISP is internet service provider. Domain is usually the name (or domain) of your ISP company. So if Optimisey was your ISP (a sideline we’re not planning just yet) your ISP domain would be optimisey.com. Got it?

So using this filter can be helpful if all your office traffic is routed through the same ISP domain. If you’re not sure you can easily check. Try the handily named https://www.whatismyip.com.

It will tell you your IP address and ISP. Get a few colleagues to run the test too and you should have a clear idea of if you’re all on the same ISP.

Traffic from the IP address

This takes it up a notch. All the computers in an office probably share an ISP. Each individual device will probably have a unique IP. This is where, if you wanted to, you could filter out ‘Dave in accounts’ but not Steve (as he might actually buy your widgets).

A word of caution here – IP addresses sometimes have a habit of changing. They can be static (not changing) or dynamic (changing).

If, like me, you have a laptop it’s possible that each time you connect to wifi, plug-in to a cabled connection, wifi again etc. you change your IP each time. Note: possible. Likely even but not always.

Using that whatismyip.com checker can lull you into a false sense of security. “My IP hasn’t changed since yesterday. I must be on a static IP.” You may not be.

The only way to be sure here is talk to your tech guys and girls. It’s probable you have a ‘range’ of IPs which get assigned.

You can use a Google Analytics filter to screen out ranges of IPs as well as just single IP addresses.

Traffic to the subdirectories

Did you notice the change in language there? We went from talking about “Traffic fromto “Traffic to“. This trips up a surprising number of people.

Subdirectories are the folder structure on your website. Right now, on optimisey.com you’re in the /seo-advice/ subdirectory. Look, you can see it in the URL and address bar in your browser.

Maybe, on your main public website, you have a subdirectory for staff – say yourwebsite.com/staff-only/.

Using a filter on a subdirectory, you could screen visits to this subdirectory from your reports.

Careful now – as it will only filter visits to that subdirectory. Filters – blunt instruments remember. So if Sally Staffmember goes to your website homepage and then clicks into the /staff-only/ folder, her visit to the homepage will still be capture and reported on in a view with a subdirectory filter on.

Traffic to the hostname

Another to (not from) again. Hostname’s are similar to but not to be confused with subdomains (more on the difference between subdomains and hostnames).

So something like blog.majestic.com is probably a hostname (without checking their DNS records I can’t be 100% sure).

With our staff only example you could use a filter here to screen out traffic to staff.yourdomain.com.

Same caveat applies – if Sally Staffmember goes to your homepage and then to staff.yourdomain.com her visit to the homepage will be logged. Have I mentioned filters are quite blunt instruments?

Check your filter – Verify

Using the above, you have all the tools to set-up the right filter to screen out yourself and/or your colleagues as you see fit.

Use the whatismyip.com site to collect IP or ISPs as required and set-up your Predefined filter – being sure to set it to Exclude.

Google Analytics then has a handy Verify this filter link. Use it.

Screenshot from Google Analytics (2017) showing how to verify a filter in a view

It then gives you a table showing what your traffic looks like before and after your filter – so you can be sure your filter is working how you want it to.

Filter order

Once you Save your finished filter it’s now filtering your web traffic in that view. Like, right away.

On the main filter page you’ll spot that next to the big red + Add Filter button is a button called Assign Filter Order.

Using this you can pick in which order your filters apply. Just for clarity, filter #1 comes first.

If, say, your filter #1 screened all the traffic from your office ISP and #2 filtered all traffic to the /staff-only/ subdirectory – any of your colleagues in the office would be screened out by #1 even before they got as far as the /staff-only/ subdirectory (rendering it somewhat pointless – unless you also wanted to remove any one that’s not staff trying to click into the /staff-only/ section too.

Filter the bots too

Now you’ve filtered yourself out you’ll want to filter the bots too. As has been said, bots don’t have credit cards, so they’re not buying your stuff (yet).

Google, Bing, Yahoo – all the search engines – plus any other number of sites and tools may be sending bots to crawl your site. They’re not buying, so you probably want to filter them out from your main traffic reports.

If you want to know more about what the Bots are doing and how you can find out – Move-It-Marketing boss, Dawn Anderson, has probably forgotten more than most will ever know about Bots, spiders and server logs. Read their blog.

For now, we’ll screen the bots out (remember, if you need them, they’re in your unfettered All Data view which you’ve done nothing to, right?).

For your reporting view, head to the View Settings in the Admin panel.

There are actually four handy things you should do whilst you’re here:

Screenshot from Google Analytics (2017) showing the View Settings page where you can screen bots and set-up site search tracking

  1. Go to View Settings
  2. Make sure the currency is displaying the relevant one for your view – if this view is for your US sales team they may not understand British pounds – this is a simple switch to make their life easier
  3. Check the Bot Filtering box – note the Google caveat about “known bots and spiders” – but this will get a chunk of them for you without having to add more filters yourself
  4. Switch Site search Tracking ON – it defaults to OFF.

Assuming you have a site search, you want this last one on an collecting data ASAP.

Once you switch it on Google Analytics will ask you for the Query parameter. This is overly complex language for some again.

What it means is: ‘What is the bit your site search adds to your URLs to run a search?”

Let’s look at an example. Head over to bbc.co.uk – their site search is top right. Click it and search for say… custard.

To show you the results it takes you to: http://www.bbc.co.uk/search?q=custard

You can see the word we searched for “custard” in the URL. The bit before that is the query parameter Google is after. In this case ‘q’.

Note it’s just ‘q’ you want not ‘q=’. Pop that into the query parameter box in Analytics and you’ll be tracking your site search.

Your customers will, quite literally, be telling you what they’re looking for and/or what they can’t find.

You’ll find all that lovely data in your Google Analytics report under the Behaviour section. Look for Site Search and thank me later.

I may do a whole blog post about the goodness that can be extracted from Site Search data. For now – just switch it on and get it collecting data.

How was it for you?

Have you set-up your Google Analytics account? Did these tips help? What problems did you come across? I’d love to hear your thoughts in the comments below.

Cambridge SEO MeetUp

If you found the above useful (perhaps even interesting?) you will love the free Cambridge SEO MeetUps I’m organising.

They are chock full of useful, actionable advice and tips about SEO and how to get your business moving on up in the search engine rankings.

Sign up for free

4 thoughts on “Google Analytics: Guide to getting the most out of ‘GA’ – views and filters”

  1. Andrew,

    This is a great post. you beat me to it actually as I have something very similar in draft format.

    So many companies don’t have analytics set up at all. No webmaster tools, nothing, nada.

    Even those who do have Analytics, I’ve found them to be tracking in UD dollars, allowing all kinds of spam referrals and bots, and not tracking internal search. *All of which you have pointed out. It’s unbelievable, but It keeps people like us in work, So I guess we should be thankful huh?

    1. Couldn’t agree more Phil. When I started this blog I planned lots of more in-depth SEO stuff… but so often, looking at sites even these fundamentals aren’t in place.

      I learned the hard way that – if you cannot measure your success, clients find it hard to understand what SEO is doing for them. Having ‘clean’ data is key to that.

      Have lost count of the number of times I’ve asked for Search Console access to met with blank faces. Now I don’t presume. I force myself to ask: “Have you heard of Google Search Console?” and go from there!

  2. Thanks for a really helpful post….
    Quick question,
    I don’t have a search box on my website so does the ‘Site Search Settings’ apply ?

    If so what do I do with ‘Site search categories’ box, do I switch on or off? Does the same ‘q’ apply ?

    thanks 🙂

    1. Hi Jessica. If you don’t have a site search (and I don’t either, so you’re not alone!) you’re safe to switch this “Off”.

      If you have a large site or perhaps work in a niche where customers are confused/lost – internal site search data can be really useful – to help you find out what your potential customers want; and what they’re looking to you for; or what they’re finding it difficult to find etc.

      But if you don’t have a site search function, you can ignore that bit of this blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.