Please follow the instructions in this article
Step #1. Define your internal IP addresses
In Google Analytics 4, go to Admin > Data Streams and select your website stream.
Then click Configure tag settings:
Then click Show all and select Define internal traffic. Here you can create new internal traffic rules.
You can create separate rules for each IP if you are working with multiple IPs. Or you can create a regular expression and include multiple IP addresses there, like in the example below:
You can always enter “internal” in the traffic_type value field to simplify things. Then it will be enough to have one Internal Traffic filter in your GA property.
If you don’t know your IP address, click the link on the right side.
Step #2. Create a developer filter in GA4
You might wonder what the difference is between a developer filter and an internal traffic filter in GA4. Both of them exclude data from the regular reports in GA4 (by checking different parameters).
The developer filter checks the debug_mode or debug_event parameters while the internal traffic filter looks for traffic_type.
But the key difference here is that you can see developer traffic in the DebugView of GA4, while the internal traffic is not displayed anywhere.
At least, that’s the theory. But I had mixed results here, and sometimes the internal traffic filter gets a higher priority than the developer traffic, and the debug view does not work as a result.
So what can we do here? I’ll answer that in the next chapter. But first, let’s create a developer filter (because it is not ready by default). In GA4, go to Admin > Data Filters > Create Filter. Select Developer Traffic. Enter the following settings:
You can enter any name in the “Data Filter Name” field. Set this filter to Testing (for now). Save it.