Sub topic 5
Creating the Internal Traffic Data Filter
Assume that you have a GA4 web data stream, Editor or Administrator access, and an internal traffic rule that assigns the value internal to the traffic_type event parameter. This chapter shows how to turn that label into a property-level data filter.
How the filter works
An internal traffic rule identifies matching visits. The rule adds an event parameter such as:
| Event parameter | Value | Meaning |
|---|---|---|
| `traffic_type` | `internal` | The event came from a defined internal network |
The data filter then checks incoming events for that parameter and value. When the filter is Active, GA4 excludes matching events from reports and data used for analysis.
The filter does not remove users from your website, stop events from being sent, or change data that GA4 already processed. It affects future data after the filter state changes.
Create the filter
- In Google Analytics, open Admin.
- Under Data collection and modification, select Data filters.
- Select Create filter.
- Choose Internal traffic as the filter type.
- Enter a clear name, such as
Exclude office traffic. - Confirm that the filter condition uses the
traffic_typeparameter with the valueinternal. - Set the filter state to Testing.
- Select Create.
The condition must match the value produced by your internal traffic rule. If the rule uses office but the filter expects internal, the filter will not identify those events.
Keep the filter in Testing while you validate it. Testing does not permanently exclude data. It lets you observe which events match before you activate the filter.
Choose the filter state
GA4 provides three states:
| State | Effect on incoming data | Recommended use |
|---|---|---|
| Testing | Matching data remains available but receives test-filter information | Validation before activation |
| Active | Matching data is excluded from applicable processing | Permanent exclusion |
| Inactive | The filter does nothing | Pausing or retaining a configuration |
After you create a filter, allow time for new events to arrive. Do not judge the result from old reports. Data filters are not retroactive.
Check the filter before activation
Open Explore and create a temporary exploration that includes the Test data filter name dimension. Look for the name of your filter, such as Exclude office traffic.
Perform a controlled visit from a network covered by the internal traffic rule. Trigger a few events, then check DebugView and the exploration. DebugView helps confirm that events arrive, while Test data filter name shows whether GA4 marked them as matching the Testing filter.
If matching visits do not appear with the test filter name, check these values:
- The public IP address matches the internal traffic rule.
- The rule uses the same
traffic_typevalue as the filter. - The correct web data stream sends the events.
- Your browser or network is not using a VPN or changing its public address.
- You allowed enough time for the events to appear.
When the results are correct, return to Admin > Data filters, open the filter, change its state to Active, and save it. Record the activation date in your analytics change log.
Exercise
Why should an internal traffic filter remain in Testing before it becomes Active?
Show answer
Testing shows which incoming events match without permanently excluding them, so you can correct the rule or parameter value before data is removed from processing.