- How do filters work in GA4?
- Why do we need filters in Google Analytics 4?
- How are data filters different from segments?
- What filters can be used in Google Analytics 4?
- Internal traffic
- Developer traffic
- What filter states are possible in GA4?
- How to set up filters in Google Analytics 4?
- Detecting internal traffic
- Configuring internal traffic filtering
- Setting up a filter for developer traffic
- What restrictions apply to filters in Analytics?
Filters in Google Analytics 4 are a powerful tool that is used to segment traffic within the analytical system. They can be used to include or exclude specific sources of visits to the website, as well as limit the collection of data according to specified conditions.
Filters in GA4 are applied at the presentation level and make it possible to effectively adapt analytics to specific business objectives. This makes it possible to create custom views for different purposes and teams – for example, create a separate segment exclusively with search traffic for SEO contractors or completely exclude traffic from company employees from tracking.
How do filters work in GA4?
Filters allow you to segment information about visitor behavior, events, and internal transitions on a website. It is worth understanding that they only work with new data that arrives after they were set up. They do not change historical statistics collected before they were applied. That is, you can implement them without fear of losing previously accumulated information on the project.
However, you should remember that their filter effect is irreversible. After implementation, the system simply will not record and process incoming traffic from one source or another. Therefore, you need to work with this tool carefully, clearly understanding the consequences of each decision.
Filters in GA4 are applied on a first-come, first-served basis. Information sequentially passes through all stages of filtering, and at the output we receive a final set of events that will be reflected in the report.
Filters come in two types:
- Include. Only information that meets the specified conditions is included in the reporting. For example, you can include only visitors from a specific country or only events with a certain parameter value.
- Exclude. They remove a segment that matches the specified conditions. For example, you can remove service traffic from the IP of company employees or bots.
Why do we need filters in Google Analytics 4?
You can use filters in Google Analytics 4 for:
- Restricting access to different specialists. In the process of working on a project, several separate teams are often involved, which are engaged in search engine promotion, contextual advertising, web analytics, development, conducting targeted advertising on social networks, etc. Each of them has their own tasks and their own focus. Filtering allows you to create separate views for each specialist, including only those sources and metrics that are relevant to their work.
- Service traffic exceptions. Company employees can open the resource to update content, add products, check prices, make changes to the layout, etc. These visits are taken into account in statistics, but do not reflect the actual behavior of target visitors, which can greatly distort the overall picture. The tool allows you to limit the recording of visits from office IP addresses and receive information only about the real audience.
- Segmentation by subdomains or directories. If you want to separate traffic for a specific subdomain into a separate view, this can also be done using filtering. This is convenient if a paid advertising campaign is set up for a subdomain, and organic promotion is used for the main domain.
How are data filters different from segments?
At first glance it may seem that they perform similar functions, but there are several important differences between them:
- Filters affect all data at the presentation level and change it irreversibly. This means that after they are applied, the data will be displayed only in a filtered form, and it will not be possible to return it to its original state. Segments, on the contrary, do not change the sources, but only temporarily allocate a certain part of the traffic for analysis. You can use and combine them as many times as you like without fear of irreversible consequences.
- If multiple filters are used in a view, they are applied sequentially. Information is first filtered by the first condition, then by the second, and so on. At the output, we get the result of sequential processing. Segments can be used in any order and combined with each other. Each of them allocates a portion of visits in accordance with its own conditions.
- Filters are not applied to previously collected statistics. Segments can be used for all information, including previously collected information. This allows you to analyze historical sections and compare different audiences.
What filters can be used in Google Analytics 4?
In the fourth version of Analytics, as a rule, filtering is used to cut off inappropriate calls from the organization’s own employees, programmers and layout designers who edit the code, etc. After all, many points that had to be filtered in the previous version of the analytical system have already been corrected. For example, the service automatically recognizes UTM tags and associates them with the main URL.
However, you definitely need to configure filtering:
Internal traffic
It refers to visits from managers, SEO specialists, copywriters and other employees of the organization who are not targeted for the business. Filtering these visits is especially important now, as many companies are switching to working from home. This means that it is not enough to cut off the recording of visits from the office IP, because the networks are different everywhere.
When employees are actively working on a project, they generate a significant volume of visits, which significantly distorts the real picture of behavioral factors and affects the accuracy of analytics.
To filter internal transitions from general statistics, you can:
- Exclude static IP addresses. This method is suitable if the company has a small number of employees and they work from static IPs. Then you can create a separate filter for each address, specifying an identical match condition.
- Use regular expressions. If there is a need to exclude several IPs or their range, you can use custom filters by specifying a condition using a regular expression. This way, you can process multiple addresses that match a specific input mask.
- Use C This is the most complex technique, which is best used only when the previous options do not work (for example, the user logs in via a dynamic IP or you need to limit data transfer to a very large number of addresses). In this case, the technician must create a special page on the site, upon visiting which a cookie is written to the user’s browser. This file will block the transfer of information to Analytics on subsequent visits. At the same time, when you clear the history in the browser, everything will be reset to its original state.
Developer traffic
When working with a resource, a technical specialist often checks the functionality of the functions, blocks and elements he configures, which leads to the generation of a significant amount of service traffic. Obviously, it does not reflect the behavior of the target audience and significantly distorts the overall statistics.
To filter out such visits, you can use a special DebugView tool designed for debugging. With it, you can test the changes you make and the operation of new scripts before deploying them to production.
Using DebugView you can remove all test runs from the main reports. These statistics will be available only in the corresponding section, without affecting the overall picture. And programmers, layout designers and testers will be able to carry out their tasks without hindrance.
What filter states are possible in GA4?
There are three different states available in the system:
- Testing. In this mode, the tool does not make permanent changes, but only shows how it will work. This is a very useful feature, because it allows you to check the correctness of configurations and evaluate the impact on reports, without the risk of losing information.
- Active. In this mode, it will permanently change the metrics in the view. To activate it, move the switch to the appropriate position, as shown in the screenshot above and save the changes. At the same time, be careful, because the changes applied are irreversible.
- Inactive. In this mode, the filter has no effect on statistical data. To deactivate it, click on the three dots icon and select the “Deactivate” option. It will no longer apply to new visits, but previously filtered ones will not be restored.
How to set up filters in Google Analytics 4?
The process of setting up filters in GA4 may differ depending on which visits you want to filter out. Next, we’ll look at how to limit tracking for internal traffic and visits to a website from developers.
Detecting internal traffic
To set up filters in Google Analytics 4 for a company’s internal traffic, go to the “Administrator” tab by clicking on the icon at the bottom left. In the “Data Streams” section, find the stream for which you need to configure and click on the arrow next to it “>”, as shown in the screenshot:
Click “Show All” at the top right. From the options provided, select “Detect internal traffic”:
Next you can add the necessary IP addresses that need to be filtered in the system. You can add them one by one, by clicking on the “Add condition” button or specify a whole range:
In addition, the system allows you to find out your own IP by clicking on the corresponding button. When all the conditions have been added, save the changes. After this, the service will ignore visits coming from the specified addresses.
Configuring internal traffic filtering
Go to the Administration menu. In the section that opens, go to the “Resource” item. Then on the left, find the “Data Settings” option, and from the list that appears, select “Data Filters”:
The default internal traffic filter is added in testing mode. This makes it possible to check its operation without direct implementation. After testing, you can decide whether to activate it or disable it.
Click on the “Create filter” button at the top right. In the field that appears, select the “Internal traffic” option:
Next, you should come up with a name for the filter and select the type of operation (include, exclude). At the next stage, select the internal traffic that we outlined earlier. After filling out, click on “Create” to save your completed actions.
Setting up a filter for developer traffic
In the administrator section, find the required resource and click on the list that appears. From the available options, apply “Data Filters”. In the new window, click “Create filter” at the top right, where you will need to select the appropriate filter type (in our case, development traffic):
After selecting, you will be taken to the settings tab. Here you need to set a unique and understandable name. After that, in the “Operation” tab, select the “Exclude” option so that the service does not process certain information. In order not to remove anything unnecessary, it is better to always initially run filtering in testing mode.
After completing the configuration, click “Create”. If you need to view which visits are filtered, go to the resource settings and click on “DebugView” in the list that opens:
What restrictions apply to filters in Analytics?
- You can configure no more than 10 filters for one resource. This is the maximum limit set by the service. Therefore, you should carefully consider the structure and select the highest priority parameters for filtering.
- Once you set up a filter, it may take 24 to 36 hours for the changes to take effect. This time limitation should be taken into account when analyzing and interpreting reports.
- The length of the filter name should not exceed 40 characters. It can contain letters, numbers, spaces and underscores. This limitation helps keep the list structured and readable.
- Once activated, filtered visits are excluded from reporting. Even if you roll back the changes in the future, you will not be able to restore previously filtered information.
- To create, change and delete a filter, you must have editor or admin rights for the selected resource. This way, you don’t have to worry about giving regular user access to contractors or clients.
- The tool only applies to new information received after activation. Therefore, when analyzing historical data, it is important to consider at what point the changes took effect.