Google Analytics Filters

Google Analytics Filters allow you to control which data is included (and excluded) in your reports. Once applied, they’ll continue to be applied each time the Report API is called to fetch reports.

The most common filter that people create is to exclude internal traffic from showing inside Google Analytics (GA). The purpose of this step is to eliminate your own visits from your reports so that your data will be cleaner and more accurate.


Dimensions and Metrics

Dimensions are properties or attributes that describe your data. Dimensions are used to segment, sort, and organize your data. Dimensions are represented by non-numerical values. For example, the dimension Gender indicates the gender of the user visiting a website.

Metrics measure your data quantitatively. These are numerical values that measure data in relation to a dimension. For example, the metric Users measures how many users are there. You can use these dimensions and metrics to filter your reports to include only the data required.


Creating Filters

While creating the pipeline with Google Analytics as the source, you can select Advanced Options to configure the Metric Filters and Dimensions Filters. Click on Add New Metric Clause or Add New Dimension Clause to add a Metric filter or Dimension filter respectively. These filters provide greater flexibility with options like:

  • Include/Exclude data.

  • Inequality expressions (Exact Match/ Partial Match/ Begin with/ Ends with etc.).

  • Case sensitivity.

Add Dimensions and Metrics filters

You can also create and apply multiple filters while configuring. However, the order you apply multiple filters matters. We’ll take an example where we’ll put dimension filter on dimension pagePath. We want to include all path with /blog and /articles. So, we create two filters: Include /blog and Include /articles. These filters are applied in cascading order and GA will compare pagePath with /blog first and then with /articles. If they are applied in opposite order, it would result in zero results.

Hevo recommends you test these filters using Query Explorer if you’re just getting started with filters.

General Use Cases where GA filters come in handy:

  • Exclude Internal IP/Traffic.

  • To ensure Data Accuracy include specific hostname.

  • Include a device category.

  • Include a Country.


Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Jul-27-2022 NA - Added section, Dimensions and Metrics.
Last updated on 19 Aug 2022

Tell us what went wrong