How do you create a custom filter in GA4?

To create a custom filter in GA4, go to Admin, select the property you want to edit, open "Data settings" and choose "Data filters". Click "Create filter", pick a filter type (Developer traffic or Internal traffic), set your conditions, and save. Filters apply to new data only, not historical reports.
Key takeaways
- GA4 has two native filter types: Developer traffic and Internal traffic. You cannot create arbitrary free-form dimension filters at the property level the way Universal Analytics allowed.
- Internal traffic filters work by matching IP addresses you define under Admin > Data streams > Configure tag settings > Define internal traffic.
- A filter set to "Testing" state does not remove data; it tags it, so you can verify the filter is working before activating it permanently.
- Custom channel groups and comparisons inside Explore or standard reports are not the same as data filters; they segment data for analysis without permanently removing anything.
- Filters are irreversible once active on collected data. There is no undo for data already processed.
What does a custom filter actually do in GA4?
A data filter in GA4 tells the property to include or exclude specific events from processing. Once an event is excluded, it is gone from that property permanently. This is different from a report filter, which simply narrows the view of data that already exists.
GA4 currently supports two filter types at the property level: Internal traffic and Developer traffic. Both work by reading a special event parameter (traffic_type or debug_mode) and either including or excluding events that carry that value.
How do you set up an internal traffic filter step by step?
Setting up an internal traffic filter is a two-stage process. First you define what counts as internal traffic; then you activate the filter that acts on that definition.
Stage 1: Define your internal IP addresses
- Go to Admin and select your GA4 property.
- Under "Data collection and modification", open "Data streams".
- Select the relevant web data stream.
- Click "Configure tag settings", then "Define internal traffic".
- Click "Create" and give the rule a name.
- Enter the IP address or IP range of your office, team or any device you want to exclude. GA4 accepts single IPs, ranges and CIDR notation.
- Save the rule. GA4 now tags hits from those addresses with
traffic_type = internal.
Stage 2: Activate the data filter
- Return to Admin and, under "Data collection and modification", select "Data filters".
- Click "Create filter" and choose "Internal traffic".
- The filter will reference the
traffic_typeparameter value you set above. - Set the filter state to "Testing" first. This labels matching data without deleting it, so you can check your reports under the "Test data filter name" dimension before committing.
- Once you have confirmed the filter is capturing the right sessions, change the state to "Active".
Do not skip the testing stage. An active filter that captures too broadly will strip real user data permanently.
What is the difference between a data filter and a report filter in GA4?
This is where many small business owners get tripped up. A data filter operates at collection time and permanently changes what is stored in the property. A report filter operates on data that has already been collected and simply narrows the view for that session.
Report filters, comparison segments and exploration filters are the right tools when you want to look at a subset of data without affecting anything else. Use data filters only when you are certain an entire category of traffic should never appear in any report for that property.
If you need flexible, non-destructive segmentation, the Comparisons feature in standard reports or custom explorations inside the Explore section are more appropriate. They do not touch the underlying data.
| Tool | Where it operates | Effect on data | Reversible? |
|---|---|---|---|
| Data filter (property level) | At collection/processing | Permanent exclusion | No |
| Report filter | On existing data, view only | No change to stored data | Yes |
| Comparison / segment | On existing data, view only | No change to stored data | Yes |
| Custom channel group | At analysis | Reclassifies sessions for reports | Yes |
What are the risks of getting GA4 filters wrong?
The most common mistake is activating a filter before testing it. If your IP range is too broad, genuine customer traffic disappears from your property with no recovery path. GA4 does not backfill data once a filter removes it.
A second risk is applying filters to a shared property when different teams need unfiltered access. In that case, create a separate GA4 property for clean, unfiltered data and treat the filtered property as your working view.
Finally, filters only affect data going forward. If internal traffic has been polluting your reports for months before you set a filter up, you will need to use report-level filters or segments to isolate clean data in historical analysis.
When should you use a filter versus a different approach?
Use a data filter when a category of traffic is genuinely worthless to every person who accesses the property. Internal team traffic is the clearest example.
Use a report filter or segment when you want to study a subset of traffic, test a hypothesis, or compare audiences. These are the right tools for most analytical questions because they preserve the raw data and let you undo the view any time.
If your goal is to understand which marketing channels drive conversions, explore custom channel groups and Explore reports rather than filters. Filters are a scalpel for data hygiene, not a general-purpose analytical tool. At Revolve, we treat data filters as a one-time setup task done carefully once, not something adjusted repeatedly as questions change.
Frequently Asked Questions
Can you create a filter based on a custom dimension or event parameter in GA4? Not at the property data-filter level. GA4's built-in data filters are limited to Internal traffic and Developer traffic types. To filter by a custom dimension or event parameter, you need to use report filters, segments or the Explore section, where you have much more flexibility.
Does a GA4 data filter affect historical data? No. Data filters only apply to data processed after the filter is activated. Events collected before the filter was turned on remain in your reports unchanged. This is why testing and timing your activation carefully matters.
What happens to data in "Testing" filter state? GA4 tags matching events with the filter name rather than excluding them. You can then use the "Test data filter name" dimension in your reports to see exactly which sessions would be affected, without losing any data. Change the state to "Active" only when you are satisfied the scope is correct.
Can you have multiple data filters active at the same time in GA4? Yes. GA4 applies all active filters together, and they interact. If two filters both target the same traffic, they stack. Review each filter's conditions before activating a second one to make sure they are not catching more than you intended.
What if my team uses a VPN with changing IP addresses?
You cannot reliably filter out VPN traffic by IP if the addresses change regularly. The practical alternative is to use a query parameter or manual tagging approach via GTM to set traffic_type to internal on team devices, then let the filter pick up that value regardless of the IP address.
Written by the Revolve team, a digital marketing agency based in Banbury, Oxfordshire, helping small and mid-sized UK businesses make sense of their analytics, paid advertising and SEO data.
Last updated: 14 October 2026
By Revolve
Need expert support on search, paid media or measurement?
Get in Touch →