Three Google Analytics Filters You Should Be Using Today

In Google Analytics, filters provide a flexible way of modifying the data within each view of your analytics account. You can use them to exclude data, include data, or actually change how the data looks in your reports. Filters help you transform the data so it’s better aligned with your business needs. Google Analytics applies the filters from each view to the raw data collected from your website or app at the time of processing. The filtered data is what we then see in the reporting UI for each view.

There are three filters that every analytics account should set up right away: spambot filtering, excluding internal IP addresses, and forcing all pages/referral sources to lower case.

1. Spambot Filtering

This one is super easy because it’s a simple checkbox on your ‘View Settings’ page. In the admin section, navigate to the ‘View Settings’ page and scroll down until you see the checkbox for Bot Filtering. Check it. There ya go, it’s that easy to filter out a known list of bots and spiders – all you have to do is check the box and Google applies the filter in the background, checking against a known list of bots and spiders.

68728258-7003-41AD-8AB5-D74462F4C5E6

2. Excluding Internal IPs

First, in Google Analytics, navigate to the Admin section of your Google Analytics view. Then, under the View Settings menu, select ‘Filters’. Select ‘New Filter’. You should see the following filter setup screen:

C55B9B60-B704-4224-B0DE-94EEAD546CAA

First, we need to decide if we want to create a new filter or apply an existing filter. You can apply an existing filter if you have filters already set up in another view of the same analytics account by selecting the ‘apply existing filter’ box and selecting the filter you’d like to add to the current view. In this case, however, we’ll select ‘Create new Filter’.

Next, we’ll need to name the filter. Let’s name it ‘Exclude internal IPs’.

Then, we’ll need to choose between a Predefined Filter and a Custom Filter. Predefined filters are templates for some of the most common filters. Custom filters let you truly customize filters to fit almost any unique situation. In this case, since excluding IP addresses is a common filter, we can select the Predefined filter for excluding traffic from the IP addresses that contain our businesses IPs. We’ll enter the IP for our business in the box that appears, like this:

BEE83804-8A92-4B4E-A12D-18598248018E

The final step is to verify the filter, but in this case, Analytics cannot provide a preview for this filter because previews for advanced filters and location-based filters (e.g, IP address, Country) are not supported at this time.

Finally, hit save. Once we’ve saved this filter and applied it to a view, Google Analytics starts checking the IP addresses of traffic to the web property. Any traffic data from the IPs that you’ve excluded in the filter will be thrown out of the views to which the filter has been applied.

3. Forcing URLs to Lowercase

We can also use a filter to clean up our data. For example, sometimes a website will show the same page regardless of the case of the URL — uppercase, lowercase or mixed case. You may have pages with URLs such as ThankYou.html, thankyou.html, and THANKYOU.html, and without a filter to force them all to the same case, they would show up as three separate pages in a pages report in Google Analytics.

To prevent this separation and see the page data in aggregate, we can set up a lowercase filter to force all of the URLs to a single case. This is an important filter to set up to ensure we are analyzing the total impact of a page on our website rather than taking a chance on aggregating several different versions of the same URL.

Select ‘New Filter’. We’ll leave ‘Create new filter’ selected and title this filter ‘Force URL to Lowercase’.

Next, select ‘Custom’ as the filter type. Then select the box for ‘Lowercase’. Because we want to ensure that the whole URL is forced to lowercase, we’ll select the ‘Field type’ ‘Hostname’. Note the info bubble which explains why you would want to use a filter like this one.

4D244B53-AFAA-48BC-816C-0723663F74D5

Finally, hit ‘Verify filter’ to ensure you’ve got the filter setup correctly and then hit ‘Save’.

NOTE: Filters, like all configuration settings, are not applied retroactively to your data. They are only applied from the moment you create them.

Now that you’ve setup three of the most common and useful filters, you’re on your way to having a cleaner data set in your reports.

Leave a Reply

13 Comments

  1. JB

    Excellent tips…especially #1, excluding bots/spiders. But what kind of puzzles me though is why Google doesn’t have this option turned ON by default? Or for that matter, why even have this option at all…why not just automatically exclude bots/spiders not matter what? I guess I don’t understand why anyone would ever want to have bots/spiders included in their analytics.

    • Krista

      Since it was an added feature, GA didn’t want to just turn it on for everyone because many people may have seen a significant impact on their account data and might question why that had happened. This way, each user makes a conscious decision to impact their data.

  2. Thanks for your post Kristina 🙂

    I would also like to add in that a great filter would be to filter out spam referral domains. I’ve seen things inflated on my end by up to 1-5K visitors based on different domains.

    I’ve set up two filters to catch all of them, hopefully, the main one that I’m using now is by going to create a new filter, choosing custom, choosing ‘Exclude’, choosing ‘Campaign Source’ as Filter Field and then putting in domains in there that I want to block out, so domainname|domain-name2.

    I’ve set up for both the domain name with the TLD, in this case it is domainname\.com|domainname|domain-name2\.com|domain-name2 but it looks like my first example works. I’ve also set up a custom filter field “Request URI”, but it looks like the “Campaign Source” is handling things on my test pages just fine, so I won’t set both in the future.

    I’m looking forward to an official fix from Google, because some of the heavy offenders are substantially increasing referral and thus overall traffic numbers, but this seems to be doing it for now. For those new to this, possibly check out your Analytics data for some of these heavier offenders: trafficmonetize, 4webmasters, webmonetizer and dailyrank, to name a few.

    • Hi Nedad and Krista,

      Does the “bots and spiders” checkbox not excluded ghost referrals as well? It seems there are new filters every day that need to be applied for eliminating spam in GA. I haven’t used campaigns in GA yet so, would I need to exclude these “manual referrals” as well?

      I’d appreciate your help on this 🙂
      Chio

      • Hi Chio,

        I am almost 100% certain that that the checkbox only blocks out the bots that are known, these spammers aren’t really bots, they are just spam referrals. You would need to set it up manually to block them out as you come across them. I check at least once a week to make sure there aren’t any new ones, but even weekly I’ve had an incident where one spammer sent about 7K “visitors”.

        Christopher mentions using hostname filters, but in my research most places mentioned that the spammers circumvent that, so I’ve stuck to my method as it looks to be working in showing me more accurate data.

  3. Really like the first tip regarding spam bots! I had no idea that little check box existed. I’m heading straight to my Analytics account now and am going to enable it on my account. Thanks for sharing.

    I have a different type of filter set up to exclude internal visits on my site. My IP address changes from time to time, so I can’t filter out by a single IP address. Instead, I have a bookmark saved which includes Analytics campaign parameters which I then filter out using the campaign source.

  4. Thanks Krista,
    You have given me my first lesson in Google analitics that I understood better noit only did you explain clearly how to do each step you also explained the why which for someof us is truly improtant if we are to understand how it owrks for us.
    Michael Pearce, Getting to the Heart of the Matter! @ MichaelsHealthAnswers.ca

  5. Thank you Krista ! These are definitely important filters. I missed the 3rd filter. Added it now. Thanks again!!

  6. Muhammad Talha

    Great Tips! Thanks.

  7. Good post. Not so technical and applicable.
    Thanks for sharing.

  8. Pingback: 9C Monthly Roundup - Grow Digital Marketing Muscles

  9. I didn’t found any real difference with or without enabling Bot Filtering in Google Analytics, I think spam bots are more smart than this option. Ultimately got rid off to spam bot traffic by making filters.

Next ArticleThree Google Analytics Views You Should Use Today