Google Analytics 4 filters are limited.
Universal Analytics provided many ways to eliminate, consolidate or more with traffic.
GA4 allows you to cut out two kinds of traffic: internal (based on IP addresses) and app developer testing.
I believe there will be more options in the future, but let’s work with what’s available.
Two Types of Google Analytics 4 Filters
Internal Traffic Filters
GA4 internal traffic filters are based on IP addresses. Here’s how to set yours up:
1. Go to Admin
2. Click Data Streams in the Property column
3. Scroll to the bottom and click “More Tagging Settings”
4. Click “Define Internal Traffic”
5. Click the blue “Create” button
6. Name your rule i.e. “Brad’s home WiFi”
7. Write “internal” for the traffic_type value
8. Choose your match type. You have five options:
- IP address equals
- IP address begins with
- IP address ends with
- IP address contains
- IP address is in range (CIDR notation)
9. Enter your IP address (or part of it, depending on the option you chose)
If you don’t know your IP address, click the hyperlink on the right, or Google “what’s my ip address.”
Note that if you unplug/reset your router, your IP address will change and you’ll have to update this filter.
10. Click the Create button
(If you later edit a rule, a Save button will appear instead)
11. Return to the Admin > Property column and click on Data Settings > Data Filters
12. Click on the “Internal Traffic” row
13. Type “internal” into the traffic_type parameter value field. (Unless you’re a rebel and you named your parameter something else, in which case you should type that.)
14. Select either Testing or Active, click Save, and you’re all done. You’re now filtering internal traffic from your GA4 dashboard.
You may notice that you have two filter operations options: Include and Exclude.
If you’re filtering internal traffic, you should leave this on “exclude.”
It’s very unlikely you would only want to include traffic from a particular (set of) IP address(es).
Filter Testing Mode
If you’re filtering a single IP address and you followed all these steps, there’s no need to use testing mode. Testing ensures you’re not going to exclude that you would have otherwise wanted in your dashboard.
Filtered-out traffic cannot be retrieved.
Since this filter is based on an IP address with which you’re familiar, it’s difficult to mess this up.
If you do create an internal traffic filter, you should be aware of how it affects DebugView. I’m going to explain that now.
DebugView and Internal Traffic Filter
An important warning regarding DebugView (accessible in the Configure panel). If you use it from the same IP address you have filtered as internal traffic, DebugView won’t work!
My DebugView wasn’t working for weeks, and I couldn’t figure out why. I finally spoke with Google technical support and they told me it was because of my internal traffic filter.
I was told that if I want to use DebugView, I should go to a friend’s house (seriously) or somewhere else to do so.
As that’s not a realistic solution, I turn off the filter every time I want to use DebugView. You can also just keep your filter off altogether.
Hopefully Google finds a better solution.
Developer Traffic Filters
Developer traffic filters apply to devices you use to test your app. They are “identified with the event parameter debug_mode=1 or debug_event=1.”
If you don’t have an app, this filter is of no use to you.
If you do have an app, you can test and activate it to filter out traffic from test devices.
Will more filters be added to GA4 in the future?
Google hasn’t said, but I believe the official documentation hints that yes, we will have more filter options in the future: “There are currently two types of data filters…”
It’s the word “currently” (bolded by me) that makes me think they’ll add more filters down the road.
Edit GA4 Filters
In the relevant GA4 property:
1. Go to Admin
2. Click Data Settings
3. Click Data Filters
4. Click the right-pointing arrow highlighted below:
5. Change whatever is necessary on the following screen.
6. When you finish, click the blue Save button.
Repeat steps 1 through 3 above for edit filters.
4. Click the three vertical dots at the far-right of the column for the filter you want to delete/deactivate
5. Click “Deactivate filter”
As you will see, the row for that filter doesn’t go away, it becomes inactive.
Activate and Test Filters
The steps here are exactly the same as the ones above for “Delete/Deactivate Filters.”
The only difference is that at the end of the process, you will see different options after clicking the three vertical dots.
Choose the appropriate option – activate or test – and you’re good to go.
How many filters can you have in GA4?
The Google Analytics 4 filter limit is 10 per property.
Remember that a property can contain both web and app “data streams” in Google Analytics 4.
Filter Bot Traffic in GA4
In Google Analytics 4, bot traffic is automatically excluded from your data. You don’t need to do anything to filter it out.
This was an optional filter in Universal Analytics.