Fun with Filters in GA, Part 1

Google Analytics filters are great for excluding certain data from your reports, such as traffic from your company's IP addresses or staging server. They're also relatively simple to create.

In addition to the general Exclude and Include filters, GA also offers an Advanced filter option. In their help documents, Google does a good job explaining what to do, but not why you'd actually want to use this option. I want to share three helpful filters we've used at Viget that help make your data cleaner and workload lighter. I'll also share a few more soon!

1. Make data tagging easier. If you're running paid ads on lots of sites, you're probably using the URL builder tool (if not, you should be!). This helps distinguish the different forms of paid traffic. You can define the hosting website in your utm_source tag, but manually doing that can be time consuming. To get this useful information more quickly, use this filter (mouse over to expand):

If you tag all your paid media with a utm_source of "media", then once you've added this filter, your Source report will show not a source of just "media", but  Yippee!

2. Clean up your mess!  If you add only the filter above, you'll probably notice that you just made a mess of your reports:

The problem with the first filter: when it pulls in the URL, it pulls in the whole URL. This means that not only do your reports look messy, but you'll have multiple line-items for the same domain. You can fix that with this filter:

This will clean up your URLs for any referring site ending in .com. You can do the same with all other sites, replacing the ".com" parts of the filter with .org, .ly, and any other domain extension that might be hosting your ads.

3. Clean up your URLs, while you're at it. Multiple line items relating to the same content can plague the Content reports, too. For example, often, it's not consistent whether your URLs do, or don't, always end in trailing slashes. Though it's a bigger SEO issue to address, it also impacts your GA reports, giving you separate line items for the exact same content. Viget even dealt with it for a short stint:

Solve the problem with this filter:

It will lob off the "/" at the end of the URL, but it will still keep your homepage in tact (which normally appears as "/" in your reports--and you probably don't want that disappearing!).

Hope these are helpful! Do you use any other filters that make your life easier?


Paul is a senior digital analyst, where he works with clients such as Stanley Black & Decker, the University of Virginia, Lenovo, and the Wildlife Conservation Society. He believes in using data to prove the value of creativity, cut out digital clutter, and resolve disputes.

More posts by Paul