There are many blog posts about GA4 filters and, more specifically, about the importance of the internal traffic filter in Google Analytics 4

However, only some people understand the importance of a developer traffic filter in GA4. Therefore I dedicate this blog post to discussing cases when you should use it.  

Why should you use a developer traffic filter in GA4?

When you run a company (website or app), you should use an internal traffic filter to exclude your team members’ traffic from Google Analytics. You can read about how to set up internal traffic in my blog: “How to filter internal traffic in GA4 (Google Analytics 4)?”. However, activating the internal traffic filter will block all internal traffic in Google Analytics 4. There won’t be any way to see it in real-time or DebugView reports. That means you and your developers won’t be able to debug implementations before making them live.

Therefore, if you make changes to your app or add new tags and want to test-check your implementation first, you should activate the DebugView report and enable the GA4 developer traffic filter. When you enable these two GA4 features, you can troubleshoot their implementation in the DebugView report, and GA4 will filter the data they generate. Otherwise, Google Analytics 4 will filter your data, and you won’t be able to debug their implementation. 

The main Google tools developers use to test and set up their implementation usually send the necessary parameter into GA4 to label this traffic as developer one. For instance, Google Tag Manager automatically sends  ‘debug_mode’ = true into Google Analytics 4 whenever you use GTM Preview Mode. Therefore, it will activate the DebugView report automatically, and you will need to set up a developer traffic filter only.

However, if you use GTAG or Firebase, you must code a bit to activate these two features. So, let’s delve deeper into how to set up the GA4 developer traffic filter.

How to set up the GA4 developer traffic filter?

Time needed: 30 minutes

First of all, let’s start with GA4. To set up a developer traffic filter in GA4, take the following steps:

  1. Open GA4 and go to Admin Page

    Step 1 Admin Page

  2. Go to Data Settings -> Data Filters

  3. Create a new filer, select “Developer Traffic”, and provide the following settings:

    #1 Name the filter, for instance, “Exclude My Devs From GA4 Data”
    #2 Select “Exclude” as the filter operation
    #3 Select the filter state. If you want to test your filter, select “testing”. If you use GTM and wish to remove the traffic from your website whenever someone uses GTM, you can activate the filter immediately. Providing-GA4-Developer-Traffic-Filter-Settings

Once you have made all of the above, you can leave GA4 for some time. Now, you should activate Debug View report. It means you should set up one of the places below:

  1. Google Tag Manager
  2. Firebase
  3. Google Tag

If you use GTM, as I told you above, you can leave it if you have one container and always test your GA4 events using GTM Preview Mode. GTM Preview Mode automatically sends the necessary parameter in GA4, so you won’t need to care about it anymore.

In the case of Firebase, you should enable debug mode using the following code:

-FIRDebugEnabled

For Android

adb shell setprop debug.firebase.analytics.app PACKAGE_NAME

If you use Google Tag, you must provide { ‘debug_mode’:true } variable into page view and evens code. You can read more about it in my complete guide on how to set up the DebugView report in GA4.

After you set up all of the above, you can see GA4 events generated by you in GA4 – Configure – DebugView report, and Google Analytics 4 will filter your data. Therefore, your primary GA data won’t be skewed. Below is an example of developer events in the GA4 DebugView report.

GA4 DebugView Report with Test Data
GA4 DebugView Report with Test Data

Final Thought

GA4 offers a set of filters you can use. If you use the internal traffic filter in GA4, you should also set up a developer traffic filter to allow your developers to check their implementations before deploying them. The developer traffic filter requires activating the DebugView report in Google Analytics 4. If you don’t use the DebugView report and GA4 developer traffic filter, you and your developers won’t be able to check their implementation before publishing them. 


Why should I use a developer traffic filter in GA4?


If you activated the internal traffic filter in Google Analytics 4, it would filter all internal traffic. There won’t be any way to see it in real-time or DebugView reports. That means you won’t be able to debug implementations before making them live.

Therefore, if you make changes to your app or add new tags and want to test-check your implementation first, you should activate the DebugView report and enable the GA4 developer traffic filter. When you enable these two GA4 features, your devs can troubleshoot their implementation in the DebugView report, and GA4 will filter the data they generate. Otherwise, Google Analytics 4 will filter their data, and they won’t be able to debug their implementation. 

How to set up the GA4 developer traffic filter?


Step #1: Open GA4 and go to Admin Page
Step #2: Go to Data Settings -> Data Filters
Step #3: Create a new filer, select “Developer Traffic”, and provide the following settings:
Step #3.1: Name the filter, for instance, “Exclude My Devs From GA4 Data”
Step #3.2: Select “Exclude” as the filter operation
Step #3.3: Select the filter state. If you want to test your filter, select “testing”. If you use GTM and wish to remove the traffic from your website whenever someone uses GTM, you can activate the filter immediately.

After that, you should enable debug mode in GTM, Firebase or Google Tag. 

Written By

Ihar Vakulski

With over 8 years of experience working with SaaS, iGaming, and eCommerce companies, Ihar shares expert insights on building and scaling businesses for sustainable growth and success.

KEEP LEARNING

Leave a comment

Your email address will not be published. Required fields are marked *

Leave a Comment

Your email address will not be published. Required fields are marked *

[custom_comment_form]