How To Exclude Internal Traffic in Google Analytics 4

Excluding internal traffic is one of the most commonly used admin functionality in Google Analytics.

Unlike Univeral Analytics (version prior to Google Analytics 4), this feature is not available in the usual place in Google Analytics 4. In Google Analytics 4, not only the data model is different but also the interface has completely changed as well. As a result, is hard to find some of the features/functionalities that you might be used to in Universal Analytics.  Don't worry, we got you covered.  We will be sharing tips and tricks about Google Analytics 4 in various posts.

In this post, I will show you how you can set up an IP filter in Google Analytics 4.  If you do need help with setup then don't hesitate to contact us.

How to set up the IP filter for excluding internal traffic

There are several steps to set up IP address filtering in Google Analytics 4.

Step 1:  Define the IP addresses that you need to filter or exclude

  1. Go to Admin Section of the Google Analytics 4 property
  2. Click on the Data Streams option in the admin section
  3. Click the data stream that you want to add the IP filter for
  4. Scroll down and click on "More Tagging Settings" in the "Additional Settings" section on this page
  5. Select ‘Define Internal Traffic’
  6. On the next screen click on the "Create" button to create an internal traffic rule.
  7. Set the configuration settings:
    Rule name – Provide a name to the set of IPs that are being set in this rule e.g. Corporate HQ in Seattle
    traffic_type value – Set a unique value to be used as an event parameter, e.g. internal, vendors, etc. This value will be used later when you create the filter.
    IP address - Set the Match Type and Value to match.
    Click on the "Create" button to save the rule.
  8. Repeat steps 6 and 7 above to add more IP addresses

Step 2:  Create the Exclude IP Filter

In the previous steps, you defined the IP addresses and gave them an "event parameter". Now you have to define your IP filters that will make use of those events parameters.

  1. Go back to the Admin panel of the property
  2. Click on Data Settings to expand the section
  3. Click on the Data Filters option
  4. Click on the "Create Filter" button
  5. Click on Internal Traffic to define the IP filter
  6. Set the configuration settings:
    • Data Filter Name - Provide a name for the filter
    • Filter Operation – select ‘Exclude’ from the drop-down
    • Filter events with the following parameter value - Enter the parameter value that you set in traffic_type e.g. internal)
    • Filter State - Select testing first, this will allow you to test the filter. Once you are satisfied change to "Active"

Step 3:  Test the IP Filter

Now your configuration is done and you are ready to test the filter.

  1. Go to "Realtime" reports
  2. Click on "Add Comparison" next to "All users" on the top of the report. This will open up a panel called "Build comparison" on your right hand side.
  3. Click on “Exclude” in the drop-down.
  4. In the Dimension drawdown, select  "Test data filter name"
  5. Dimension Value - Select the filter(s) that you created above
  6. Click on "OK"
  7. Click on "Apply" to apply that filter to your report.
  8. Now you will see two data sets "All Users" and "Test data filter name excludes internal traffic"
  9. Visit your site from the IP address that you excluded and your visit should now be excluded. So your "All users" numbers will be higher than the "Test data filter name excludes internal traffic" numbers.

Step 4:  Make the Filter "Active"

Once you are satisfied with the filter, go back to the filter and change the filter state to "Active"

Other Google Analytics 4 post that you might be interested in

  1. What is Google Analytics 4 (GA4)?
  2. 10 Key Things to Know Before Upgrading to Google Analytics 4
  3. Bounce Rate in Google Analytics 4

 

Need Help with Google Analytics 4?

We provide Google Analytics 4 consulting and training services. We can set up Google Analytics 4 as well as train your team to be self-sufficient. Contact us for a no-obligation consultation.

Leave a Reply

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