Data filters: internal and developer traffic

Google Analytics · Practical · 8 min

Office traffic can be a large share of sessions on a small site and silently distorts every metric.

GA4 has exactly two kinds of data filter (Admin > Data filters), up to ten per property:

  • Internal traffic: excludes events whose traffic_type parameter has a value you choose (default internal).
  • Developer traffic: excludes events that carry debug_mode (that is, anything DebugView would show).

The traffic_type value is set by a rule, not by you in code: Admin > Data streams > stream > Configure tag settings > Define internal traffic. A rule matches IP addresses (single, ranges, CIDR) and sets traffic_type = internal. Because the match happens in the tag server-side, it works for GTM and gtag alike. You can create several rules with different values (internal, agency) and a filter per value.

Every filter has a state:

  • Testing: nothing is excluded, but matching events get the dimension Test data filter name so you can see in a report what would be removed. Start here.
  • Active: matching events are dropped before processing. Permanently. There is no way to recover filtered data later, not even in BigQuery (the export happens after filtering).
  • Inactive: switched off.

A filter applies only from the moment it is active; it never removes historical data. Check the test dimension for a week, confirm the counts look like your team and not your customers, then activate.

What data filters cannot do: filter by hostname, country, bot signature or URL. For those, use report filters, custom reports with a baked-in filter, or segments in Explore. Known bots and spiders are excluded automatically and cannot be turned off.

Remote workers' home IPs change; for them, a GTM-set traffic_type based on a cookie, or simply the developer filter during QA, is more reliable than IP rules.

Remember

  • Two filter types: internal (traffic_type) and developer (debug_mode)
  • IP rules in tag settings set traffic_type; filters exclude it
  • Test first; Active is permanent and never retroactive

Check yourself

  1. You activate an internal traffic filter today. What happens to last month's office sessions?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: support.google.com/analytics/answer/10108813