Sub topic 12
Keeping Developer and Test Traffic Out of Your Reports
Assume you know how GA4 events and the Admin area work, and that you can edit your property’s data filters. This chapter focuses on developer traffic. For general test visits that are not marked as developer traffic, use an internal traffic rule or another suitable filter.
Why filter developer traffic?
When you test an implementation, your own visits create real events. Those events can affect user counts, event counts, conversions, and other reports. A developer traffic filter removes events marked as debug traffic from processed reporting data.
The filter does not delete the events from your test workflow. DebugView can still display debug events, so you can inspect them while keeping them out of normal analysis.
Developer traffic is usually identified by the debug_mode parameter. Web implementations can add it directly to a gtag.js event or enable it through Google Tag Manager preview mode. Mobile SDKs and some testing tools can also mark events as debug traffic.
Configure the Developer traffic filter
- Open the GA4 property.
- Select Admin.
- In the Property column, open Data collection and modification, then Data filters.
- Select Create filter.
- Choose Developer traffic.
- Give the filter a clear name, such as
Exclude developer traffic. - Leave the filter operation set to Exclude.
- Save the filter as Testing first.
- Generate a few debug events and confirm your testing workflow still works.
- Change the filter to Active when you are ready.
A filter in Testing lets you compare how data would be affected before the filter permanently excludes matching events from reporting. An Active data filter affects new incoming data. It does not repair or remove developer events that were already processed.
| Filter state | Purpose | Effect |
|---|---|---|
| Testing | Check the filter before committing | Reports can show the possible effect without permanently excluding the data |
| Active | Apply the filter to incoming data | Matching events are excluded from reporting data |
| Inactive | Keep the definition without applying it | No filtering occurs |
Do not confuse developer and internal traffic
The Developer traffic filter is based on debug marking. The Internal traffic filter is based on a traffic rule, commonly a defined IP address or traffic_type value. These filters solve different problems:
- Use Developer traffic to exclude visits from people debugging the implementation.
- Use Internal traffic to exclude employees or office traffic, whether or not they are debugging.
- Use both when your team tests from company networks and also tests on other networks.
A visitor can match both filters. Each filter should have a name that states the traffic it excludes and the reason for excluding it.
Verify the result without losing visibility
Use DebugView while the filter is in Testing or Active. Confirm that:
- The test device appears in the device selector.
- The expected events arrive.
- Event parameters and user properties have the expected values.
- The events remain visible in DebugView even though they are excluded from ordinary reporting data.
Do not use a sudden drop in a standard report as your only verification. Reporting data can also change because of processing delay, date ranges, identity settings, or other filters.
Exercise
Exercise
You need to test a new sign-up event, but you do not want your test sign-ups to increase the property’s reported key event count. Which tool should you use to inspect the event, and which filter should exclude it?
Show answer
Mark the event as debug traffic, inspect it in DebugView, and activate the Developer traffic data filter after testing the filter in Testing mode.