0

Multiple DimensionFilters in GA4

I have my GA4 query build in the query builder:

{"dimensions":[{"name":"pagePath"}],"metrics":[{"name":"sessions"}],"dateRanges":[{"startDate":"2023-05-01","endDate":"2023-05-31"}],"dimensionFilter":{"filter":{"stringFilter":{"matchType":"CONTAINS","value":"/bestellen/"},"fieldName":"pagePath"}}}

As you see there is a dimension filter in it. But i will select my data with more than one filter:

pagepath CONTAINS '/bestellen/'

OR

eventName CONTAINS 'example'

How do i have to add my second filter string to my query?

 

1 comment

  • Avatar
    Parker Selman Official comment

    Hi Tom,


    Thanks for the post! 

    Google's GA4 API requires the use of an OR group when setting up filters that have an OR relationship. This section from their API reference  details this setup in more detail. This should allow you to set up a dimension filter with OR functionality. 

    I hope this helps! 

    Parker

Please sign in to leave a comment.