Skip to main content

Troubleshoot nested filter logic in Google Analytics 4

Combine OR and AND dimension filters in Google Analytics 4 by splitting them across multiple data sources.

Problem summary

You want a Google Analytics 4 data source to filter dimensions with nested boolean logic, for example match rows where organization is A, or path begins with B, or path contains C and publisher is not set. The filter builder only lets you join every condition with OR, or every condition with AND. You cannot mix the two or group conditions inside one another in a single data source.

Error message or symptoms

When you open the dimension filter for a Google Analytics 4 data source, you see a single grouping choice that applies to all filter rows: either OR or AND. There is no control to nest a group of conditions inside another group, so a filter such as A OR B OR (C AND D) cannot be built.

When does this occur

  • You configure a Dimension filter on a Google Analytics 4 data source

  • You need to combine OR and AND conditions, or group some conditions together and apply a different operator to the group

  • Your single flat filter is too broad and returns more rows than you want, and you cannot tighten it because you cannot nest conditions

Root cause

The Google Analytics 4 connector builds only flat, single-level filter groups. Every filter row is joined with one operator chosen at the top of the filter, either OR or AND, and applied to the whole list. This is a limitation of Funnel's filter builder, not of Google Analytics. The Google Analytics Data API itself supports arbitrarily nested filter expressions, but the connector does not expose that capability.

Solution

Split the nested logic across several Google Analytics 4 data sources, then combine them in Funnel.

  1. Break your intended filter into branches, where each branch is a flat group that uses only OR or only AND.

  2. Create one Google Analytics 4 data source per branch, and set that branch's flat filter on it. For example, one source for each OR branch, and a separate source for the branch that needs the AND conditions.

  3. Import all of the sources into the same workspace so their rows land together.

  4. Combine the results downstream. Because the sources feed the same data hub, they are unioned into your dimensions and metrics for reporting and export, giving you the same coverage as one nested filter would.

Did this answer your question?