GA 4 Reporting – Filters

Use this Analytics Edge wizard to define filters to use with the query.

Select a Dimension or Metric, then pick a Comparison operator and enter a Value. Click the Add button. The filter will appear in the list at the bottom.

Use AND or OR logic to join multiple conditions in a single filter. AND expressions will be evaluated first, then OR operations.

Note that all the metrics and dimensions used must be valid when used in combination with the metrics and dimensions of the query itself.

Use a Cell Reference

For advanced users, you can use a filter expression stored in a worksheet, BUT the expression must be encoded exactly as the API expects it to be.  e.g.:

"dimensionFilter":{
 "filter":{
  "fieldName":"city",
  "stringFilter":{"matchType":"CONTAINS","value":"Ottawa","caseSensitive":false}}},
"metricFilter":{
 "filter":{
  "fieldName":"sessions",
  "numericFilter":{"operation":"GREATER_THAN","value":{"doubleValue":5}}}},