Google Analytics 4 Filters

Last updated on Sep 11, 2023

Google Analytics 4 (GA 4) Data Filters allow you to manage the data in your reports by either including, excluding, or applying transformations. These filters are applied at a property level, by default, to all the reports each time they are fetched.

There are various use cases where you may want to apply the filters. Some of them are:

  • Include or exclude traffic from your organization’s IP addresses, specific domains, or subdomains.

  • Include visits from specific marketing channels.

  • Filter data by geographic locations.

  • Exclude irrelevant URL query parameters.

The filters help you include only the accurate and relevant data in your reports as per your requirements.


Creating Filters

While creating a Pipeline with Google Analytics 4 as the source, you can configure the Metric and Dimensions Filter Clauses under Advanced Options. Click ADD NEW METRIC CLAUSE + or ADD NEW DIMENSION CLAUSE + to add the Metric and Dimension filters, respectively. These filters provide flexibility using the following parameters:

  • Logical Operators. For example, And, Or.

  • Include or Exclude data related to specific metrics and dimensions.

  • Numerics and their comparisons. For example, Numeric Equal, Numeric Less than or equal.

  • Regular and inequality expressions. For example, Regexp, Begins With, Partial.

  • Case sensitivity

Add Clauses

You can also create and apply multiple metric and dimension filters. However, the order in which you apply these filters affects the replicated data. For example, let us say you add two dimension filters using the Logical Operator And including the dimension pagePath, if it is equal to (Exact) /blog and /articles in the value and is Case Sensitive.

Advanced Filters Example

After configuring the Source, these filters are applied sequentially. GA 4 compares the pagePath with /blog first and then with /articles. If you apply these filters in the opposite order, no Events will be replicated to the Destination.

Note: Hevo recommends that you test the filters using the GA4 Query Explorer before completing the Source configuration. This prevents any errors that may arise post-Pipeline creation.



Revision History

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

Date Release Description of Change
Sep-11-2023 NA New document.

Tell us what went wrong