How to filter out internal traffic in Google Analytics 4(GA4)

When it comes to using Google Analytics to evaluate your website, accurate data is vital. But internal traffic can sometimes be counted amongst your statistics if you haven’t taken action to mark it as separate. This can skew your data and lead to false assumptions.

To avoid this, you can use Google Analytics to filter out internal traffic. The method of doing this will be different depending on whether you are using Universal Analytics or GA4.

In this article, we’ll show you how to exclude internal traffic in Google Analytics.

When should I filter out internal traffic?

In Google Analytics there is a difference between internal vs external traffic. Internal traffic represents any page views or visits that have come from users that are part of your company. 

External traffic represents your true website visitors, the customers that you’re aiming to attract to achieve your conversion goals.

The first thing to do is decide whether you actually need to block the internal traffic in Google Analytics at all.

Deciding whether to filter out internal traffic comes down to how much traffic your website has and how large your internal team is. 

Here are two different situations to help you decide whether to filter out internal traffic.

Situation A: If your Google Analytics data shows that you have under 10,000 users per month, and if your internal team numbers between 5 and 10 members, then filtering out internal traffic isn’t really worth it.

This is especially true if your team rarely visits your website and if they don’t make any test purchases or lead form submissions. 

For smaller websites, using Google Analytics to filter internal traffic isn’t worth it because it won’t have a huge impact on your overall numbers, so you can just ignore this small percent of traffic.

Situation B: Now, imagine you have the same amount of traffic with 150 total conversions recorded on the website. However, 50 of these conversions are actually test conversions from your developers. This is where it makes sense to filter out this traffic, as it will impact Conversions data for the entire website significantly.

Filtering internal traffic in Universal Analytics

So if you decide to filter out your internal traffic, how do you do it? There are several ways to exclude internal traffic in Universal Analytics:

  • You can exclude your team members by using IP filters.
  • You can use a separate sub-domain (such as dev.yourwebsite.com) for any developer testing that you want to do. This development site should ideally have its own Google Analytics ID.
  • Your conversion tracking can be configured to avoid firing on the test domain(if you use one Google Tag Manager account for both websites, for instance).
  • Your developers and other team members should be “marked” (let’s say, using custom dimensions) to allow you to exclude their hits.

Many of these methods are often missed in real-world applications. If you are using Google Analytics 4, the methods will be different because of the new and updated features. We’ll detail how to exclude internal traffic in GA4 below.

“Define Internal Traffic” option in Google Analytics 4

In Google Analytics 4 there is a specific feature called “Define Internal Traffic”.

This feature allows you to set up rules to deсide which of your traffic is “Internal” – based on the IP address.

Let’s quickly summarize the differences between Universal Analytics and GA4 when it comes to internal traffic:

Universal Analytics: you can manage internal traffic using Filters, as discussed above.

Google Analytics 4: you can define which part of the traffic is considered internal.
Then you can use this in the “Data Filters” feature.

How to tag the traffic as “Internal” in Google Analytics 4 interface?

In order to tag the right traffic, you need to find your internal traffic in Google Analytics. Here’s a quick walkthrough of how to define internal traffic in GA4:

Step 1: Open the “Admin” menu in Google Analytics 4.

Step 2: Click on the “Data Streams” option in the Property column.

Step 3: Choose the Web data stream where you need to define the Internal Traffic

Step 4: Click “More Tagging Settings” 

Step 5: Click “Define internal traffic”

Step 6: Click “Create”

Step 7: Make the configuration

  • Give the name to the Rule, like “Company Headquarters”;
  • Leave “traffic_type value” field as default(“internal”);
  • In “IP addresses” choose one of 5 conditions(“…begins with”, “… contains”, “ends with”, “… equals”, “… is in range (CIDR notation)”)
  • Paste the IP address(or part of it, or IP range) in the “Value” field. Add more conditions, if needed

Step 8: Click “Save”.

How to tag the “Internal traffic” in Google Analytics 4 using JavaScript or Google Tag Manager

There are other ways to “mark” the traffic as Internal in GA4 in addition to the IP-based rules. These methods can be used if you’re using JavaScript or GTM.

You’ll need to set up a rule that tells the program when to mark users as internal and then filter all Google Analytics 4 events performed by them with the parameter “traffic_type” set to “internal”.

You can do this in the JS-code for GA4 events or via Google Tag Manager. This is a more complicated way of filtering internal traffic but can be a more reliable method. It’s worth diving into in a separate technical guide.

Here is the screenshot for Google Tag Manager:


One of my clients did a separate URL for the internal traffic. Team members visited it, and then marked it in the cookie as internal. 

How to work with the Internal traffic in Google Analytics 4 reports

Now that we’ve told GA4 how to recognize internal traffic, the traffic from certain IPs will be “marked” as internal. We can either exclude this data from our GA reports or we can analyze it.

How to exclude the Internal traffic in Google Analytics 4

You can use Google Analytics 4 to remove internal traffic, also known as “excluding” the traffic. This part works a little bit differently than it does in Universal Analytics.

Google Analytics 4 has “Data Filters”, and one of the built-in filter types is “Internal Traffic”. Here’s a walkthrough detailing how you can enable this filter:

Step 1: Open the Admin Panel in Google Analytics 4

Step 2: Click on “Data Settings” in the middle column

Step 3: Click on “Data Filters”
Step 4: There might be an enabled filter with the “Internal Traffic” filter type.

By default, this filter is shown in “Testing” mode. This means that you can see that the traffic is internal in your GA4 reports, but it is not excluded.

To exclude internal traffic from GA4 reports, you need to switch the mode from “Testing” to “Active” and save the changes:

That’s it! Now your internal traffic will be excluded from reports so that you won’t see it anymore.

Check your data and revise your Internal traffic rules from time to time to make sure you are always excluding this part of the traffic.

How to analyze the internal traffic in Google Analytics 4

If you didn’t change your Internal traffic from its default “Testing” mode setting in the “Internal Traffic” Data Filter, you can actually analyze the data from this portion of the traffic. 

Here’s a quick guide on how to analyze this traffic:

Step 1: Open “GA4 → Events → Engagement”

Step 2: Click “+ Add Comparison” at the top of the screen

Step 3: The “Build comparison” window should appear on the right. Type “Test data filter name” in the “Dimension” field

Step 4: Click “Select dimension values”, choose “Internal Traffic” and click “OK”

Step 5: Click “Apply”

After that, you will see a “Test data filter name” comparison segment added to your “Events” report:

You can use this approach in other GA4 reports to analyze your Internal traffic.

Conclusion

Things are different if you compare Google Analytics 4 and Universal Analytics in terms of work with internal traffic. With Universal Analytics, you will need to configure your settings to separate and exclude your internal traffic.

In GA4, the method of excluding internal traffic has been changed to become more standardized whilst still allowing you some scope for customization.

Whichever version of Google Analytics you use, you now know how to exclude your internal traffic.

Write a Comment