Google Analytics: The Beginner’s Guide To Filters


Google Analytics The Beginner's Guide To Filters

Mastering Google Analytics Filters: A Comprehensive Guide

Filters are crucial for any business aiming to gain meaningful insights from their data. Today, we will delve into Google Analytics Filters and how they can be effectively used to refine your data. If you’re new to this or have struggled with Google Analytics filters in the past, this guide will help you navigate through the process and utilise them to your advantage.

What are Google Analytics Filters?

By default, Google Analytics collects data from all your website visitors, which can be overwhelming and confusing. Filters allow you to refine this data by including or excluding specific information based on your requirements. This ensures that your reporting includes only the most relevant data for your business.

Why Use Filters?

  • Exclude Internal Traffic: Remove data from your employees’ visits to ensure you only analyse actual customer behaviour.
  • Include Specific Data: Focus on traffic to specific subdomains or sections of your website.
  • Clean Up Data: Ensure data consistency by normalising cases and removing unwanted parameters.

Types of Google Analytics Filters

Google Analytics provides several types of filters, each serving a different purpose. Understanding these types will help you decide which filter is best suited for your needs.

View Filters

View filters are created within the Admin section of Google Analytics and require edit-level access. The effects of these filters are permanent, meaning once data is excluded, it cannot be retrieved. These filters can be applied to dimensions, not just metrics.

Table Filters

Table filters are created in the reporting environment and do not require edit-level access. These filters affect the data temporarily and are often used for brainstorming and ad-hoc analysis. Advanced table filters can be applied to any combination of dimensions and metrics.

Segments

Segments can be set up by any user and affect historical data rather than future data. These are used for short-term segmentation and ad-hoc analysis, allowing you to analyse specific subsets of your data.

Best Practices for Creating Views in Google Analytics

Before applying filters, it’s important to set up your Google Analytics views properly. Ideally, you should have three views in your GA account:

  1. Primary Reporting View: This is where you apply your filters for more accurate and personalised data.
  2. Raw Reporting View: A backup view that collects all data without any filters. This ensures you always have access to unfiltered data.
  3. Test Reporting View: A view used to test filters before applying them to the primary view. This prevents accidental data loss.

Always test your filters in the Test Reporting View before applying them to the Primary Reporting View, as there is no way to undo filter effects in Google Analytics.

Setting Up Filters in Google Analytics

To create view filters in Google Analytics, you must have edit access. Follow these steps:

  1. Navigate to Admin: Click on Admin, then Filters.
  2. Add a Filter: Click on “+Add Filter” to create a new filter.
  3. Configure the Filter: A new configuration screen will appear. Name your filter appropriately to avoid confusion in the future.
  4. Choose Filter Type: Select between Predefined and Custom filters.
  5. Verify and Save: Verify the filter to ensure it works as expected, then click on “Save.”

Predefined Filters

Predefined filters are straightforward and can be created quickly. They offer three main options:

  • Exclude/Include Only
  • Source or Destination: Filter traffic based on ISP domain, IP address, subdirectories, or hostname.
  • Expression: Match traffic based on equal to, begins with, ends with, or contains expressions.

Examples of Predefined Filters

  • ISP Domain Filter: Useful for large organisations with their own ISP. Specify your ISP domain to filter data accordingly.
  • IP Address Filter: Exclude internal traffic by adding your organisation’s IP address.
  • Subdirectory Filter: Include or exclude traffic to specific subdirectories, useful for focusing on particular sections of your website.
  • Hostname Filter: Filter traffic by hostname to prevent data contamination from other websites using your tracking code.

Custom Filters

Custom filters offer more flexibility and include several categories:

  • Exclude/Include
  • Lowercase/Uppercase
  • Search and Replace
  • Advanced

Examples of Custom Filters

  • Exclude/Include Filters: Use these for more specific filtering needs, such as content and traffic, campaign details, or audience characteristics.
  • Lowercase/Uppercase Filters: Normalize your data by converting all entries to lowercase or uppercase, ensuring consistency in your reports.
  • Search and Replace Filters: Replace unreadable identifiers with more meaningful names for better clarity in your reports.
  • Advanced Filters: Combine multiple fields using regular expressions for more complex filtering needs.

Advanced Filters Example

To display the hostname in reports, use an advanced filter to combine the hostname and request URI. This is particularly useful if you have multiple subdomains.

Field A -> Hostname
Field B -> Request URI
Output -> Request URI

Filter Order in Google Analytics

The order in which filters are applied can impact the data. If multiple filters alter the same data, the filter order becomes crucial.

Example of Filter Order

  1. Filter 1: Include only a specific section of the website.
    • Data before filter: /mblog, /mblog/post1
    • Data after filter: /mblog, /mblog/post1
  2. Filter 2: Include complete URL.
    • Data before filter: /mblog, /mblog/post1
    • Data after filter: www.domain1.com/mblog, www.domain1.com/mblog/post1

Changing the filter order can result in no data being matched, as the first filter may alter the data in a way that prevents the second filter from working correctly.

Benefits of Google Analytics Filters

Filters offer numerous benefits, including:

  • Data Security: Restrict access to specific sections of data, ensuring sensitive information remains protected.
  • Convenience: Simplify data analysis by creating views with the most relevant data.
  • Accurate Reporting: Exclude internal traffic and irrelevant data for more accurate insights.

Points to Keep in Mind

  • Filters are permanent, so choose carefully.
  • Always test filters in the Test Reporting View first.
  • Maintain a backup view with unfiltered data.
  • Filters may take up to two hours to take effect.
  • Consider filter processing order for accurate results.

Filters to Avoid

Not all data needs view filters. In some cases, segments are more appropriate:

  • Geo-location filters: Use segments instead.
  • Campaign tags: Avoid using filters.
  • Device-specific filters: Use segments to analyse data by device.

Inbound Links

Outbound Links

Conclusion

Google Analytics filters are powerful tools that can help you refine your data and gain more accurate insights. By understanding and applying the right filters, you can ensure that your analytics data is relevant and useful for your business decisions.

Remember to test your filters thoroughly before applying them to your primary view and always keep a backup of your unfiltered data. With the right approach, Google Analytics filters can significantly enhance your data analysis and reporting capabilities, enabling you to make data-driven decisions with confidence.

About Paul Hughes

With over 20 years experience in the web hosting industry I have a passion for technology and security solutions.