Filter Internal Traffic Using Data Filters in Google Analytics 4

Nicholas Hooker - January 27, 2023

For marketers, it is important to be able to distinguish between website traffic and internal traffic that their analytics platform collects. This is primarily because internal traffic has the potential to greatly skew vital metrics used for analysis and decision making. Therefore, by differentiating or excluding internal traffic, marketers can focus purely on customer activity or any other external users visiting the website.

Google Analytics 4 has introduced Data Filters to solve this problem. Data Filters allow marketers to include or exclude event data from your standard reports and custom reports. At the moment, there are only two type of data filters that have been released by Google (we expect more to be released in the near future). These data filters are:

  1. Internal Traffic Data Filter
    • This data filter is setup by default when you create a Google Analytics 4 property and is set to a “testing” filter mode, which essentially allows marketers to evaluate the data filter against collected data in analytics reports without applying permanent changes to the data collection process. We will cover the various filter modes further down below in this post.
    • Internal Traffic data filters are based on “internal traffic rules” one defines. These rules allow marketers to define internal traffic from a specific IP address or range of IP addresses. One thing to note is that you can only enter IPV4 or IPV6 IP address format into the traffic rule. Additionally, the traffic rule does not support the use of regular expression (regex). This is important to note because you can’t block a large range of employee IP addresses with one rule.
  2. Developer Traffic Data Filter
    • Developer Traffic data filters are optional to setup and are used to filter event data from your app on development devices. This filter is geared towards business that utilize Google Analytics on their applications.
    • In this case, developer traffic is identified with the event parameter debug_mode=1 or debug_event=1. When either of these event parameters are present in the debug view, it allows developers to validate their Analytics instrumentation without that traffic appearing in reports so long as the filter mode is set to “testing”.

Now that you have a better understanding of the two types of data filters that have been released by Google. It is important to note that these data filters have one of three filter modes that determine how analytics evaluates that data filter. These are the following:

  1. Testing
    • As mentioned above, this filter mode allows marketers to evaluate the data filter against collected data in analytics reports without applying permanent changes to the data collection process.
  2. Active
    • This filter mode applies permanent changes by evaluating the data filter against collected data in analytics reports.
  3. Inactive
    • This filter mode does not evaluate the data filter.

In regard to the “testing” filter mode, you might be wondering how one evaluates the data filter against collected data in analytics reports without applying permanent changes to the data collection process.

To do this, follow the next steps:

    1. Open any standard report in Google Analytics 4.
    2. At the top of the chosen standard report, click “Add comparison +”. In this case we choose the “Reports snapshot” report for the example.
    3. Once you’ve clicked on “Add comparison +”. The build comparison window should popup.
      1. Set the comparison to “exclude”.
      2. In the dimension field search box type “Test data filter name”.
      3. Once you’ve selected the dimension name, select “Internal Traffic” value, and hit “Apply”.
    4. Once the comparison is applied you will see a “Test data filter name” comparison segment added to all your reports for analysis until it is removed.

Just like that you are now able to evaluate internal traffic against collected data in analytics reports without applying permanent changes to the data collection process. Once you’re confident that the test filter is working properly. You have the option to switch the filter mode from “testing” state to “active” state which would apply permanent changes to the data collection process.

To do this, follow the next steps:

  1. Open the “Admin” panel.
  2. Under the GA4 property settings, select Data Settings > then select Data Filters.
  3. Once on the Data Filter screen, select the three-dot menu and hit “Activate Filter”.

It’s that simple!

You have now created a filter that will exclude your own visits from Google Analytics data.

Wrap Up

So, there you have it, a quick overview on what to expect from Data Filters in Google Analytics 4. Like any new platform, there is a learning curve, so don’t feel discouraged! If you are looking for help improving your organization’s tracking and analytics capabilities, please reach out to info@morevisibility.com.

© 2024 MoreVisibility. All rights reserved.