[GA4] Filter out internal traffic

This article is for website owners who want to filter out data from internal traffic. This article pertains to Google Analytics 4 properties; if you are using Universal Analytics, read this article instead.
You need Edit permission for the property to create, edit, and delete internal-traffic definitions. The ability to filter out internal traffic is only available in web data streams.

To filter out internal traffic, create a rule that defines the IP address or range of IP addresses that represent internal traffic.

The definition of internal traffic that you create with these rules serves as the basis for your filters to include or exclude internal traffic.

When you create a definition of internal traffic, the traffic_type parameter is automatically added to all events and has the parameter value you specify. You can also manually add the traffic_type parameter to your event code (e.g., by modifying your gtag.js code)  and give it any value you want.

Create filters in Analytics

Create definition

  1. Sign in to Analytics.
  2. In Admin, look at the Account and Property columns to make sure that you've selected your desired account and (Google Analytics 4) property.
  3. In the Property column, click Data Streams, and then click the web data stream for which you want to define internal traffic. (This option is not available for app data streams.)
  4. Under Additional Settings >More Tagging Settings, click and then.
  5. Click Define internal traffic.
  6. Click Create.
  7. Enter a name for the rule.
  8. traffic_type is the only event parameter for which you can define a value. internal is the default value, but you can enter a new value (e.g., emea_headquarters) to represent a location from which internal traffic originates.
  9. Under IP address > Match type, select one of the operators (e.g., IP address equals).
  10. Under IP address, enter an address or range of addresses that identify traffic from the location you identified in Step 8. You can enter IPv4 or IPv6 addresses.

    The following examples show how to identify IP addresses for each operator:
    • IP address equals: 172.16.1.1
    • IP address begins with: 10.0.
    • IP address ends with: .255
    • IP address contains: .0.0.
    • IP address is in range (ranges need to be expressed in CIDR notation):
      • 24-bit block (e.g., 10.0.0.0 – 10.255.255.255): 10.0.0.0/8
      • 20-bit block (e.g., 172.16.0.0 – 172.31.255.255): 172.16.0.0/12
      • 16-bit block (e.g., 192.168.0.0 – 192.168.255.255): 192.168.0.0/16
  11. Click Create.

Edit definition

  1. Sign in to Analytics.
  2. In Admin, look at the Account and Property columns to make sure that you've selected your desired account and (Google Analytics 4) property.
  3. In the Property column, click Data Streams, and choose the web data stream for which you want to edit the internal-traffic definition.
  4. Under Additional Settings > More Tagging Settings, click and then.
  5. Click Define internal traffic.
  6. Click the row for the definition.
  7. Click Edit.
  8. Make the changes you want, then click Save.

Delete definition

  1. Sign in to Analytics.
  2. In Admin, look at the Account and Property columns to make sure that you've selected your desired account and (Google Analytics 4) property.
  3. In the Property column, click Data Streams, and choose the web stream for which you want to define internal traffic.
  4. Under Additional Settings > More Tagging Settings, click and then.
  5. Click Define internal traffic.
  6. Click the row for the definition.
  7. Click More > Delete.

Related resources

Data filters

Was this helpful?
How can we improve it?