Filters in Google Analytics 4: how to set them up?

Blog

A filter in Google Analytics 4 is a tool that allows incoming data to be automatically filtered based on a specific parameter. It's very important to set it up, as it excludes the actions of the team working on the project from the analytics and allows you to analyze what real users were doing.

What types of data filters are there?

Currently, there are two types of data filters in GA4:

  1. "Internal traffic" — filters out employee traffic.
  2. "Developer traffic" — excludes traffic coming from debugging devices.

Let’s take a closer look at both types.

Фильтры в Google Analytics 4: как их настроить? 1

What is the internal traffic filter in GA4?

Internal traffic is generated when the website is visited by copywriters, suppliers, managers, SEO specialists and others. These users are not the target audience, but if the team is large, the traffic volume will be significant and distort the data in reports. A corresponding filter has been created to exclude it.

What is the "Developer Traffic" data filter in GA4?

Developer traffic comes from users who are setting up or tracking the resource in debug mode — it allows checking the settings on the website. It also affects the metrics in reports, so it should be filtered. When using this filter, such data remains only in the DebugView report, which is necessary for testing and allows checking each change before deploying it to the production environment.

Filter states in GA4

Filters can be in one of three modes: testing, active, and inactive.

Фильтры в Google Analytics 4: как их настроить? 2

Testing

Applying filters leads to irreversible changes in the data: by filtering out part of the data, you will no longer be able to view it in Analytics. Therefore, you must test the filters before activating them.

However, the filter in "Testing" mode does not make irreversible changes and allows you to analyze its correctness. To do this, add a comparison to the report by applying the parameter "Test data filter name".

Фильтры в Google Analytics 4: как их настроить? 3

Active

In this state, the filter irreversibly changes the data. To activate it, click the three dots in the row with the filter (1) and select "Activate filter" (2).

Фильтры в Google Analytics 4: как их настроить? 4

After that, Analytics will display a warning about the irreversibility of the filter action. Confirm the activation to apply the filter.

Фильтры в Google Analytics 4: как их настроить? 5
Фильтры в Google Analytics 4: как их настроить? 6

Inactive

In this mode, the filter does not change the data. To deactivate the filter, click the three dots in the row with it (1) and select "Deactivate" (2).

Фильтры в Google Analytics 4: как их настроить? 7

Filters can also be deleted. To do this, on the filter editing page, click the three dots (1) and select "Delete" (2).

Фильтры в Google Analytics 4: как их настроить? 8

How to set up the internal traffic filter in GA4?

Before setting up filters in Analytics, check your permissions — you will need editor or administrator access to the resource.

Фильтры в Google Analytics 4: как их настроить? 9

Defining internal traffic

  1. This is the first step in the setup. Go to "Admin" (1) — "Resource" — "Data Streams" (2). Click the arrow to the right of the desired stream name (3).
Фильтры в Google Analytics 4: как их настроить? 10
  1. A window with stream information will open. At the bottom of it, select "Tagging Settings".
Фильтры в Google Analytics 4: как их настроить? 11
  1. To view the settings, select "Show all" (1). In the dropdown list that appears, click on "Define internal traffic" (2).
Фильтры в Google Analytics 4: как их настроить? 12
  1. In the opened window, the configured rules for this action are displayed. 
Фильтры в Google Analytics 4: как их настроить? 13

If there are no configured rules, GA4 will display a corresponding notification. To create a new rule, click "Create" (1). It's very convenient that there is also a link to help (2).

Фильтры в Google Analytics 4: как их настроить? 14
  1. In the opened window, set the following rules.
Фильтры в Google Analytics 4: как их настроить? 15
  1. Specify the rule name (1).
  2. In the next field, enter a clear name for the parameter traffic_type value (2). Important: different traffic sets will require different names.
  3. In the dropdown menu (3), select the appropriate matching type for the IP address.
Фильтры в Google Analytics 4: как их настроить? 16
  1. In the "Value" field (4), enter the IP address whose traffic should not be considered in the Google Analytics reports. To exclude your own IP, click the link "How to find your IP address?" (5) and enter it in the corresponding field.
Фильтры в Google Analytics 4: как их настроить? 17

If you need to exclude multiple addresses, use the "Add condition" button (6).

Example of configuration when specifying the internal traffic rule.

Фильтры в Google Analytics 4: как их настроить? 18

Read more about Google Analytics 4 in the articles:

Creating a data filter

  1. Open the admin section (1). Then click on "Resource" — "Data Settings" (2) — "Data Filters" (3).
Фильтры в Google Analytics 4: как их настроить? 19

Note: The internal traffic filter is automatically added in testing mode in each GA4 property.

Фильтры в Google Analytics 4: как их настроить? 20
  1. To create a new filter, click the corresponding button. 
Фильтры в Google Analytics 4: как их настроить? 21
  1. Click on "Internal traffic" in the opened field.
Фильтры в Google Analytics 4: как их настроить? 22
  1. In the filter settings, enter a name for it (1). 
  2. In the "Operation" field, select "Exclude" (2) so that the system does not process data based on the specific filter. If you need to analyze only data from the filter, select "Include only".
  3. In the traffic_type field (3), enter the name specified during the definition of internal traffic. 
  4. After all actions, click "Create" (4).
Фильтры в Google Analytics 4: как их настроить? 23

How to set up a traffic filter for developers?

  1. Go to the admin section (1), select your property, and open the dropdown list with settings (2). Click on "Data Filters" (3).
Фильтры в Google Analytics 4: как их настроить? 24
  1. Click "Create filter".
Фильтры в Google Analytics 4: как их настроить? 25
  1. In the window that appears, select the required type.
Фильтры в Google Analytics 4: как их настроить? 26
  1. A window with settings will open. Enter a unique and clear name for the filter (1).
  2. In the Google Analytics 4 window, under "Filter operation" (the "Operation" field), select "Exclude" (2) from the dropdown list to prevent Analytics from processing data according to the filter. Click "Include only" (2) if you want to analyze only the data from this filter.
  3. Select the "Testing" mode (3).
  4. After configuring the settings, click "Create" (4).
Фильтры в Google Analytics 4: как их настроить? 27

Done, the filter has been created. You will see the following notification on the screen...

Фильтры в Google Analytics 4: как их настроить? 28

After this action, data from debug mode will no longer appear in reports or affect the data. However, if you need to view it, go to the Admin section (1), select your property (2), and click on "DebugView" (3).

Фильтры в Google Analytics 4: как их настроить? 29

To activate debug mode on your device, use:

  • the preview mode in Google Tag Manager;
  • the GA Debugger extension for the Chrome browser.

Limitations of filters in GA4

  1. A maximum of 10 filters can be configured per property.
  2. The time between configuring and applying data filters can range from one day to a day and a half.
  3. The maximum length for filter names is 40 characters. They must be unique for a single site. The first character must be a letter, and then underscores, spaces, letters, and numbers can be used. Unicode.
  4. To create, modify, or delete a filter, editor access to the site is required.
  5. The action of GA4 data filters is irreversible: already filtered information cannot be viewed even after the filter is turned off.
  6. Applied filters do not change historical data: information before the filter was applied will remain unchanged.

Сonclusions

  1. Currently, in GA4, there are two types of data filters: "Internal traffic" and "Developer traffic." Internal traffic is generated when the website is visited by copywriters, suppliers, managers, SEO specialists, etc. Developer traffic comes from users who are involved in setting up or monitoring the property in debug mode. This traffic affects the metrics in reports, so it needs to be filtered.
  2. To create a filter, you must have editor rights for the site. Filters can be in one of three modes: testing, active, and inactive.
  3. To create an internal traffic filter, you need to define internal traffic based on the IP address. To create a developer filter, traffic definition is not required.
  4. You can check the filter's functionality in the "DebugView" report.
  5. Up to 10 filters can be created for a single property. The action of filters is irreversible, but filters do not affect historical data.

Frequently Asked Questions

What data filtering options are available in Google Analytics?

Google Analytics filters are divided into two types:

  • internal traffic — excludes visits from your employees;
  • developer traffic — excludes developers' actions from all reports except DebugView.

What is the difference between internal traffic filters and developer filters?

The Internal Traffic filter blocks all internal traffic in GA4 across all reports. As a result, developers won't be able to debug implementations before launch.

The Developer Traffic filter filters the data generated by specialists but allows events to be viewed in the DebugView report. If you're editing the site or adding new tags and want to test them, enable this filter first.

How many filters can be applied in GA4?

Up to ten filters can be created for a single property, including.