« Back to front page

4 Google Analytics Filters Every Website Should Have

This article explains four Google Analytics filters you can use to get cleaner, more accurate analytics data for your website.

If you’re like most webmasters, you rely on Google Analytics to provide you with valuable insights into your website visits. Everything from metrics such pageviews, traffic sources, and conversions to deep user behavior analysis to help you make smarter business and marketing decisions. Google Analytics is a super-powerful tool and a lot of business decisions are made based on the reports it provides.

But how accurate is your Google Analytics data? And what can you do to correct errors and make it more accurate?

Why is it important to filter Google Analytics data?

Spammers, website configurations, and other factors commonly cause data errors and incorrect reports in Google Analytics. And we all know that inaccurate reports can lead managers to make wrong business and marketing decisions.

For example, if Google Analytics under-reports ad campaign revenue by 30%, you might end up turning off the ad campaign. But what you didn’t know was the ad campaign was actually profitable, so you’re now missing out on revenue and profits.

In this article, I’ll be diving into the four filters I add to almost every account I work on. Combined, these filters will remove the most common data errors, giving you more accurate, dependable reports.

Internal traffic

Remember the old joke about the guy who ran a blog with two faithful readers – himself and his mom? It’s funny, but there’s also some truth to the joke. For many websites, the most dedicated visitors will be the website manager(s) and employees of the company. There are many good reasons why employees need to visit their own company’s website, but all those visits add up and can really skew traffic reports.

It’s even worse if your development team is placing test orders on the website when they implement new features. I’ve even seen $100,000 revenue spikes caused when the development team placed test orders for every single product on the website (needed to test some new shopping cart features).

Even without test orders, repeated visits by you and others who work at your company can add up and really skew the data shown in Google Analytics reports. For example, here’s a screenshot from Google Analytics (no filters) for one of our websites, showing a lot of visits from St. Petersburg, Florida where our office is located:


How to fix it:

This issue is really easy to fix, because Google Analytics has a prebuilt filter for it. Just go to Admin and open up the filters for your view:


Add a new filter, and select:

  • Predefined

  • Exclude

  • Traffic from the IP addresses

  • That are equal to

  • And enter your IP address


For more options on this predefined filter, see Google’s help article on Exclude internal traffic.

We added several filters to our Google Analytics view (one for each of our office IP addresses) and this is the result. Notice that the report is more accurate now, because it doesn’t include our own website visits. The biggest source of visitors in Florida is now Miami (which is expected, because there are a lot of people living there!)


Spam traffic

A few years ago some brilliant (*heavy sarcasm*) marketer figured out a novel new way to get their website URL in front of prospective customers. They would spam websites with fake traffic referred by their URL, and the webmasters of these sites would see their URL in Google Analytics and visit the site.

It’s difficult to make accurate decisions based on Google Analytics data that’s full of fake (robot) website visits referred by sites like this:


How to fix it:

The solution? Block this traffic, so Google Analytics won’t count it at all. For this, you’ll need to create a custom filter based on the Campaign Source field, like this:


You can also block multiple domains in the same rule, using a regular expression in this format: example\.com|example2\.com

See Google’s article on Filter domain referrals for more details.

What not to do:

There are a couple of really common errors that you want to avoid when blocking this spam traffic:

  • Do not add the domains to the referral exclusion list. If you do that, Google will ignore the referral source but will still count the visit. You don’t want that, because these are fake (robot) visits.

  • Do not use one of the predefined filters (see below screenshot), like “traffic from the ISP domain” (which blocks traffic based on ISP) or “traffic to the hostname” (which blocks traffic TO a hostname, not traffic FROM the hostname).

  • Don’t set the filter field to Referral. It’s actually Campaign Source that you want.


Development site

Most websites have separate URLs for implementing and testing new features before they’re launched on the main website. For example, a URL such as dev.ryte.com or staging.ryte.com. Traffic on this URL is typically employees, automated testing tools, and vendors – not actual prospects and customers that you want to track.

How to fix it:

This is another easy one to fix, since there’s a predefined filter you can use. Just create a filter set to:

  • Predefined

  • Exclude

  • Traffic to the hostname

  • That contain

  • Your domain (without https://)


Confused referral data

Another common problem in Google Analytics data is traffic showing the wrong traffic source for certain visitors. For example, if you’re using a third-party payment gateway like Paypal, your visitors may visit a paypal.com URL just before their purchase is completed. This can result in a lot of revenue showing as being referred by Paypal.com, like this:


That’s a problem, because you want to see how those customers originally came to your site (eg from a Google ad) not paypal.com as the source.

How to fix it

This one is also easy to fix – just add paypal.com to your Referral Exclusion List in Google Analytics admin (note this is listed under the website property, not under the view / filters).


Just enter the domain like this:


Once you’ve added this Referral Exclusion, Google will still count these visits, but it will attribute them to the last known source. For example:
Bob clicks on a Google ad to visit your website and purchase via Paypal. Previously, his order would have showed up as a referral from paypal.com. Now that you’ve added the Referral Exclusion, his order will be attributed to google / cpc.

What not to do:

Don’t create a filter to exclude this traffic. You don’t want to exclude this traffic (it’s real customers placing real orders) you just want to stop Google from attributing the traffic to paypal.com.


Every website is unique and will need a unique set of filters to ensure the Google Analytics data stays clean. But I’ve found that most websites need these four filter types, and just applying these will get you well on your way to cleaner, more accurate analytics data for your website. What are your favorite filters?

Ryte users gain +93% clicks after 1 year. Learn how!

Published on Oct 15, 2018 by Adam Thompson