11 Google Analytics Filters and How To Set Them Up

Google Analytics filters are a great way to define what data is included or excluded and how it appears in your reports. Below I am covering the most common ones that I use and how to set the filters up.



Google Analytics filters enable you to make permanent changes to you data. Since you’re making edits to the original data, it’s important to create several views in your Google Analytics account. One for day-to-day, one of original and one for play. You can start with the following three views:

  1. Master View: It’s the most important and accurate view that you can use on a daily basis to analyze data.
  2. Raw Data View: This the backup view that shouldn’t include any filters. Just in case something goes wrong with the Master View, you will have at least one unfiltered view that contains your full data set. It your “oh shit” moment!
  3. Test View: This is a view that you can use for testing purposes to ensure that filters work properly. If you don’t test any new view filters or settings, Test View should have exactly the same configuration that you have in the Master View.

Tip to remember: Any filters you setup today are only applied to the data from the date of creation going forward. No data is changed retroactively.

And if you don’t have an account, here is a general overview of reports in Google Analytics.



How to Create Google Analytics Filters

Step 1: Check the left bar dedicated to the settings and click on “Admin”:



Step 2 In the admin panel you will see two ways to create a filter:

Filters on “Account” level
Filters on “View” level

Google Analytics Admin View



Step 3 To create a new one, click “Add Filter”



Step 4 Configure your filter then click save.

11 Google Analytics Filters To Add To Your Account

Google Analytics is case sensitive, so it captures the data exactly as it appears in the location bar of the browser. If you use a mixed case URL is in the browser, it will be captured and displayed as mixed case within your Google Analytics reports.

You can use the lowercase filter to change URLs like ‘domain.com/Thankyou’ and ‘domain.com/ThankYou’ into one unified URL in your reports: ‘domain.com/thankyou’. You can use this exact same technique to lowercase your search terms, hostnames or any other Google Analytics field.

You will want to focus on these if you do any campaign tracking on your URLs in your email or social media marketing.

Lowercase Urls (request URI)

Google Analytics Filter Lowercase URLs

Lowercase Hostname

Google Analytics Filter Lowercase hostname

Lowercase Source

Google Analytics Filter Lowercase Source

Lowercase Medium

Google Analytics Filter Lowercase Medium

Lowercase Campaign

Google Analytics Filter Lowercase campaign

Lowercase Term (keyword)

Google Analytics Filter Lowercase keyword

Add trailing slash to URLs

You can use this advanced filter to change URLs like ‘domain.com/thankyou/’ and ‘domain.com/thankyou’ into one unified URL in your reports: ‘domain.com/thankyou/’.

Filter Name: Add trailing slash to URLs
Filter Type: Custom > Advanced
Field A -> Extract A:
Select Request URI
Enter
^(/[a-zA-Z0-9/_\-]*[^/])$
Output To -> Constructor:
Select Request URI
Enter $A1/
Select Field A Required
Select Override Output Field

Google Analytics Filter Add Trailing Slash to all URLs

Combine Campaign Source Referrers

You may see in your acquisition reports that there are a number of different sources coming through for platforms such as Facebook and Instagram. It’d be much easier to view all the traffic in one group together

Instagram Campaign Source Multiples

Filter Name: Combine – Example (aggregate)
Filter Type: Custom > Search and Replace
Filter Field: Campaign Source
Search String: ^.*example\.com$
Replace String: example

After the filter is set up you can test it by clicking “Verify this filter”. This will test the filter against traffic from the past 7 days to see how the data would have been impacted.

Remove Hostname www

Filter Name: Remove Hostname www
Filter Type: Custom > Search and Replace
Filter Field: Hostname
Search String: ^www\.
Replace String:

Google Analytics Filter Remove WWW

View Full Page URL In Reports

If you’d like to see the domain name as well as the Request URI in your reports, create an Advanced filter for your view with the following settings. This filter is especially useful if you have two domains or a subdomain.

Filter Name: Show Domain
Filter Type: Custom > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: $A1$B1

Google Analytics Filter Show Domain

Exclude Internal Traffic

Are you inflating traffic on your own website? Each time you check your website counts as traffic. Your stats may be off if you’re working with a team. You can easily filter out internal traffic by IP address.

Filter Name: Exclude Internal Traffic
Filter Type: Predefined > Exclude

Exclude Internal Traffic

BONUS FILTER: Exclude URL Query Parameters

And this isn’t exactly a filter, but I find it annoying that traffic from Facebook include a fbclid onto the URL. Heade to Admin > View Settings > Exclude URL Query Parameters and type in fbclid. That’s it!



Photo by Thought Catalog on Unsplash

Dallas Dreamhaus Katie Kinsley Selkie Puff Sleeve Dress

Behind The Blog

Katie Kinsley is a Texas-based digital marketer and aspiring influencer. This is a lifestyle blog focused on Katie’s work-in-progress life. She’s focused on creating joy in the everyday, sharing adventures throughout Dallas/Ft. Worth (and the world), and empowering women to find their confidence — all in her unique unfiltered style.

ABOUT

Please note that I use affiliate links in my content as well as on my social media accounts. When you click and shop the links, we receive a commission. Sponsored posts are noted as such.

Please see my full disclosure policy for more details.

3 Comments

  1. December 3, 2021 / 11:12 am

    I had no idea there were even google analytics filters. This is so helpful! I will have to set it up now. 🙂

    • Katie Kinsley
      Author
      December 3, 2021 / 3:53 pm

      It definitely helps you clean up your data!

  2. December 7, 2021 / 2:43 pm

    This is quite informative, straightforward and helpful.

Leave a Reply

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

You may also like...