How to Apply Custom Filters Within Google Analytics 4

How to Apply Custom Filters Within Google Analytics 4

Reportz offers you a way to quickly add some of the most standard metrics using our predefined widgets, but if you need something more specific you can use custom filters by following these easy steps.

Click on Add Data Widget and select GA4 as Integration.

After that, select your analytics account.

In the second step, select your Account, Property, and choose your Widget.

In our example, we will use a Custom widget, and select our Dimension (Session Default Channel Group) and Metrics (Sessions and Average Session Duration).

Below the Widget field, there is a Custom Filter field. Here we can filter our data using Google Analytics 4 API.

For example, we would like to present only Organic Search data with Session default channel group as the Dimension, and Sessions and Avg. Session Duration as the Metrics. We can do this by filtering the Session default channel to exact match Organic Search (type sessionDefaultChannelGroup==Organic Search in the custom filter field).

See screenshots below:

In the third step, you can add the widget title and description, choose widget size, type, etc. After you hit Submit on the final step, the widget will show only Organic Search results.

Pro-tip: If you are ever unsure what the exact name of the metric/dimension is for creating your Custom Filter - you can always click on Details to flip the widget around and see more information about it:

Google Analytics 4 Operators

Here is a table with all the Google Analytics 4 operators that can be used in data Filtering.

Reportz Custom filters also allow you to combine multiple filters for GA4 using AND and OR logic statements.

OR Operator

The OR operator is defined using a comma (,). It takes precedence over the AND operator and may NOT be used to combine dimensions and metrics in the same expression.

OR Operator Examples:

Country is either (United States OR Canada):
country==United States,country==Canada

AND Operator

The AND operator is defined using a semi-colon (;). It is preceded by the OR operator and may NOT be used to combine dimensions and metrics in the same expression.

AND Operator Examples:

Country is United States AND the browser is Firefox:
country==United States;browser==Firefox

Country is United States AND language does not start with 'en':
country==United States;language!~^en.*

Dimensions and Metrics Grouping

Dimensions and Metrics Filters should be grouped and separated with :::

For example:

browser==Firefox;country==United States:::sessions>>10;screenPageViews>>20

*Note: If you are using the AND operator (;) while creating a filter that contains both dimensions and metrics, you are not able to combine it with the OR (,) operator. These two operators can not be combined in the same expression.

In case you need additional help, you can always message our support team in live chat.

Happy reporting!

    • Related Articles

    • How to Apply Custom Filters Within Google Ads

      In Reportz, you can apply custom filters in the Custom Filter field within a widget. Click on Add Data Widget and select Google Ads as Integration. After that, select your account and click on next. In the second step, you can select your Ad account, ...
    • How to Apply Custom Filters Within Universal Google Analytics

      Reportz offers you a way to easily add some of the most standard metrics using our predefined widgets, but if you need something more specific you can use custom filters by following these easy steps. Click on Add Data Widget and select Google ...
    • How to set custom Google Analytics filters

      Note: spojen sa ovim tekstom, u kom ima više detalja: https://help.reportz.io/en/articles/2658360-how-to-apply-custom-filters-within-google-analytics Reportz offers you a way to easily add some of the most standard metrics using our predefined ...
    • How to Apply Custom Filters Within Google Search Console

      Click on Add Data Widget and select Google Search Console as Integration. For future references, Google Search Console will be referred to as GSC. Important notice: Google Search Console data can only be filtered through the dimension of the widgets, ...
    • How to Apply Custom Filters Within Facebook Ads

      In Reportz you can apply custom filters in the Custom Filter field within a widget. Click on Add Data Widget and select Facebook Ads as Integration. After that, select your account and click on next. In the second step, you select your Ad account, ...