[GA4] Data filters

You need the Editor role at the property level to create, edit, and delete filters.

You use data filters to include or exclude event data from your reports based on event-parameter values. Data filters are configured at the property level and are applied to all incoming data.

Filters are evaluated from the point of creation forward, and do not affect historical data.

Once you apply a filter, the effect on the data is permanent; for example, if you apply an exclude filter, that data is never processed and will never be available in Analytics.


You can create up to 10 filters per Google Analytics 4 property.

Filter types

There are currently two types of data filters: internal traffic and developer traffic. The filters are based on parameters that you add to your events.

Internal traffic

Internal traffic is any traffic from an IP address or range of IP addresses that you specify. You create rules that identify internal traffic. Each rule matches IP addresses to a custom parameter value. When you create a definition of internal traffic, the traffic_type parameter is automatically added to all events, and has the parameter value you specify. You can also manually add the traffic_type parameter to your event code (e.g., by modifying your gtag.js code), and give it any value you want. Learn more about creating rules that identify internal traffic.

When you create a Google Analytics 4 property, Analytics creates a default filter for internal traffic. That filter defines internal traffic as any traffic that includes the event parameter traffic_type with the value of internal. (For the filter to operate, you need to create a corresponding rule that identifies internal traffic in the same way.) This filter is in Testing mode by default, and you can activate it once you've validated that it's working as expected for your data. Learn more about how the default filter is configured and about filter modes.

When you create a new data filter, it is also based on the traffic_type parameter, but you can base the filter on any of the custom parameter values you used in the rules you created to identify internal traffic.

Developer traffic

Developer traffic originates from your app on development devices, and is identified with the event parameter debug_mode=1 or debug_event=1. If you exclude developer traffic via a filter, you can still see it in DebugView, so your developers can always validate their Analytics instrumentation.

If you don't specifically exclude developer traffic via filter, then that traffic appears in your reports.

Learn more about enabling debugging mode and debugging events.

Filter operations

When you create an include filter, Analytics processes only data that matches the filter.

When you create an exclude filter, Analytics does not process data that matches the filter.

If you include both types of filters, Analytics evaluates a union of the include filters first, then evaluates the exclude filters one at a time.

Filter modes

A filter has one of three modes:

  • Testing: Analytics is evaluating the filter but not applying permanent changes, and matching data is identified with the following dimension name and dimension value:
    • Dimension name: Test data filter name
    • Dimension value: <the name of the data filter>
  • Active: Analytics is evaluating the filter and applying permanent changes.
  • Inactive: Analytics is not evaluating the filter.

Create filters

  1. In the PROPERTY column, click Data Settings > Data Filters.
  2. Click Create Filter.
  3. Enter a name for the filter.
    The name must be unique among filters in the same property, must begin with a unicode letter, and can contain only unicode letters and numbers, underscores, and spaces. The character limit is 40.
  4. Select a filter type (either Internal traffic or Developer traffic).
  5. Select a filter operation (either Include only or Exclude).
  6. (Internal traffic only) Event parameter name is currently set to traffic_type and is not modifiable.
  7. (Internal traffic only) Enter the parameter value. The current default value is internal.
  8. See Summary for an explanation of how the filter will operate per your configuration.
  9. Select a state for the filter (Testing, Active, Inactive).
  10. Click Save filter.

For each Google Analytics 4 property, Analytics creates one default exclude filter for internal traffic with the following configuration:

  • Name: Internal Traffic
  • Filter type: Internal traffic
  • Filter operation: Exclude
  • Event parameter name: traffic_type
  • Event parameter value: internal
  • Filter mode: Testing

You need to create your own rules for identifying internal traffic in order for the filter to be effective.

Test filters

Your data that satisfies a filter is assigned to the dimension Test data filter name, and given a dimension value of the filter name. That data is available throughout the Analytics interface in dimension pickers (e.g., in Reporting and Exploration) so you can use that data to validate your filters before activating them.

Data evaluated by your test filters is available right away in the Realtime report, and becomes available in other reports as they are refreshed throughout the day.

Test your filters before activating them. Filtering is a destructive operation: once you filter data, it's gone. Forever.

Activate / deactivate filters

  1. In the PROPERTY column, click Data Settings > Data Filters.
  2. Click the row for the filter.
  3. Under Filter state, select either Active or Inactive.
  4. Click Save filter.

Edit filters

  1. In the PROPERTY column, click Data Settings > Data Filters.
  2. Click the row for the filter.
  3. Make the changes you want.
  4. Click Save filter.

Delete filters

  1. In the PROPERTY column, click Data Settings > Data Filters.
  2. In the row for the filter, click More.
  3. Click Deactivate filter.
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center