Exclude internal traffic in GA4 (Google Analytics 4) via IP filter

Last Updated: February 3, 2023

This article is in conjunction with the article What are data filters in Google Analytics 4 (GA4)? where I introduced the concept of data filters. Make sure to read it first before you start blocking internal traffic.

What is internal traffic in GA4 (Google Analytics 4)?

The traffic generated by you or your employees, suppliers and other service providers (like your developer) to your website is called ‘Internal Traffic‘.

These people are not your target audience, so we don’t need to track them.

Internal traffic can easily skew your website usage metrics and therefore must be filtered out from your GA4 reports.

How to exclude internal traffic in GA4?

Follow the steps below to exclude internal traffic from your reporting in GA4 property:

Step-1: Navigate to your GA4 property.

Step-2: Click on the ‘Admin’ link at the bottom left-hand side:

ga4 admin

Step-3: Click on ‘Data Streams’ under the ‘Property‘ column:

ga4 data streams

Step-4: Click on the data stream name for which you want to exclude internal traffic.

select ga4 data stream

Step-5: Scroll down your screen and then click on ‘Configure tag settings’ under the ‘Google tag’ section:

configure tag settings

Step-6: Scroll down the screen and then click on the ‘Show all‘ drop-down menu:

show all drop down menu

Step-7: Scroll down your screen and then click on ‘Define internal traffic’:

define internal traffic ga4

Step-8: Click on the ‘Create’ button:

create internal traffic filter ga4

You should now see a screen like the one below:

create internal traffic rule ga4

Step-9: Give your filter a name by typing in the text box under ‘Rule Name’. Let’s name our filter ‘Internal Traffic’:

rule name internal traffic ga4 1

Step-10: Leave the ‘traffic_type value’ as ‘internal’ since we are creating a filter to exclude internal traffic from the website:

traffic type internal

However, you can change this value if you pass some other parameter as an internal traffic identifier.

Note: The next step will use whatever value you pass for the ‘traffic_type value’ in the data filter settings.

Step-11: Click on the drop-down menu under ‘Match Type’:

match type ga4

You should now see a drop-down list like the one below:

match type drop down list ga4

IP address equals: This option will match only one IP address.

For example, ‘165.204.156.26’.

IP address begins with: This option will match all the IP addresses that begin with the provided input.

For example, if you provide input as ‘165’, it will match ‘ 165.204.156.26’, ‘165.203.156.28’ but not ‘167.204.156.26’.

IP address ends with: This option will match all the IP addresses that end with the provided input.

For example, if you provide input as ‘26’, it will match ‘ 165.204.156.26’, ‘167.203.155.26’ but not ‘165.204.156.28’.

IP address contains: This option will match all the IP addresses that contain the provided input.

For example, if you provide input as ‘165’, it will match ‘ 165.204.156.26’, ‘190.165.156.28’ but not ‘167.204.156.26’.

IP address is in range (CIDR notation): This default option will match a range of IP addresses.

For example, 168.208.156.28/32

Note(1): You can enter IPv4 or IPv6 addresses in the IP address field in GA4:

Following is an example of IPv4 based IP address:

IPv4 based IP address ga4

Following is an example of IPv6 based IP address:

IPv6 based IP address

Note(2): The IP address field in GA4 does not support the use of regular expressions.

does not support regex ga4

Note(3): Click on the ‘Add Condition‘ button if you want to set multiple conditions to identify internal IP addresses:

add condition ga4
add condition internal traffic rule ga4

When you set multiple conditions to identify internal IP addresses, they are joined by logical OR.

For example, IP addresses that match 2a02:c7f:a82d:8d00:4351:b3c9:7387:8802 or 192.168.1.20 will be marked as internal traffic.

Step-12: Enter the IP address from which you want to exclude your internal traffic:

enter the ip address ga4

If you want to exclude all the traffic originating from your device, but you don’t know your IP address, you should then click on the link ‘What’s my IP address’:

whats my ip address ga4

You will automatically be redirected to a new tab in your browser window from where you can see your IP address:

whats my ip address

Step-13: Copy your IP address and then paste it into the text box under ‘IP address’:

enter the ip address ga4

Step-14: Click on the ‘Create’ button to create your internal traffic data filter:

create internal traffic data filter ga4

Your new internal traffic rule will appear like the one below.

internal traffic rules ga4

Step-15: Click on the cross button (at the top left of your screen) three times to navigate back to the admin section of your GA4 property. You should now see a screen like the one below:

back to ga4 admin

How to test the exclude internal traffic data filter in GA4?

Follow the steps below:

Step-1: If you are excluding traffic from your own device, then navigate to your website via your device. 

If you are excluding traffic from an IP address that doesn’t belong to your device, then ask the person whose IP address you added (while creating the exclude internal filter) to visit your website.

Step-2: Navigate to the ‘Realtime’ report in your GA4 property:

ga4 real time report

Step-3: Click on the ‘Add Comparison’ button:

add comparison ga4

Step-4: Click on the drop-down menu under ‘Dimension’:

dimensions drop down menu ga4

Step-5: Type ‘Test’, and you should see the dimension ‘Test data filter name‘ in the drop-down list:

type test

Note: If this dimension appears disabled, you may need to wait for 12-24 hrs.

Step-6: Click on the dimension name (‘Test data filter name’) in order to select it.

test data filter name ga4

Step-7: Click on the drop-down under ‘Dimension Values and then click on the checkbox next to ‘Internal Traffic’:

dimension value internal traffic

Step-8: Click on the ‘ok‘ button.

Step-9: Click on the ‘Apply’ button:

apply button

You should now see the new comparison applied to your report:

realtme overview 1

Step-10: Refresh your browser window.

You should now also be able to see the filtered data under ‘Test data filter name..”:

filtered data ga4

The real-time view in the orange column shows us the traffic from the internal IP address we defined earlier.

This proves that our filter works perfectly fine, and we can now make it live.

How to activate the exclude internal traffic data filter in GA4?

Follow the steps below:

Step-1: Navigate to your GA4 property and then click on the ‘Admin’ link:

ga4 admin

Step-2: Click on the ‘Data Settings’ drop-down menu:

data settings ga4

Step-3: Click on ‘Data Filters’.

data filters ga4

Step-4: Click on the ‘Internal Traffic‘ data filter:

internal traffic data filter ga4

Step-5: Scroll down to the ‘Filter state‘ section, click on ‘Active’ and then click on the ‘Save‘ button at the top right-hand corner of your screen:

activate internal traffic data filter ga4

Step-6: Click on the ‘Activate Filter‘ button:

activate internal traffic data filter ga4 2

You should now see the exclude internal traffic filter listed as ‘Active’:

current status active

That’s it.

Congratulations!

You have successfully set up your filter in GA4 to exclude internal traffic.

How to deactivate the exclude internal traffic data filter in GA4?

To de-activate your data filter, follow the steps below:

Step-1: Navigate to the ‘admin’ section of your GA4 property.

Step-2: Click on the ‘Data Settings’ drop-down menu under the ‘Property’ column.

Step-3: Click on ‘Data Filters’.

Step-4: Click on the three dots menu next to the data filter you want to deactivate:

three dots menu ga4

Step-5: Click on ‘Deactivate filter’:

deactivate data filter ga4

You should now see the ‘Current Status’ of your filter as ‘Inactive’:

inactive data filter ga4

How to reactivate Exclude internal traffic data filter in GA4?

To reactivate your data filter, follow the steps below:

Step-1: Navigate to the ‘admin’ section of your GA4 property.

Step-2: Click on the ‘Data Settings’ drop-down menu under the ‘Property’ column.

Step-3: Click on ‘Data Filters’.

Step-4: Click on the three dots menu next to the data filter you want to re-activate:

three dots menu ga4 2

Step-5: Click on ‘Activate filter‘:

activate filer ga4

Step-6: Click on the ‘Activate filter‘ button:

activate filer ga4 2

How to edit an Exclude Internal traffic data filter in GA4?

To edit your data filter, follow the steps below:

Step-1: Navigate to the ‘admin’ section of your GA4 property.

Step-2: Click on the ‘Data Settings’ drop-down menu under the ‘Property’ column:

Step-3: Click on ‘Data Filters’.

Step-4: Click on the data filter you want to edit:

edit data filters ga4

Step-5: Make necessary changes and then click on the ‘Save‘ button.

How to delete an Exclude Internal traffic data filter in GA4?

To delete your data filter, follow the steps below:

Step-1: Navigate to the ‘admin’ section of your GA4 property.

Step-2: Click on the ‘Data Settings’ drop-down menu under the ‘Property’ column:

Step-3: Click on ‘Data Filters’.

Step-4: Click on the data filter you want to delete:

edit data filters ga4

Step-5: Click on the three dots menu at the top right-hand side of your screen:

three dots menu ga4 3

Step-6: Click on ‘Delete‘:

delete data filter ga4

#1 Google Analytics 4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. Setup GA4 – Upgrade to GA4 – Implementation Guide
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the Difference?
  5. GA4 vs GA4 360 – Pricing, Limits, Billing and More
  6. Google Analytics 4 Training & Tutorial with FREE GA4 ebook

#2 Google Analytics 4 Property

  1. Google Analytics Account Hierarchy (Structure Explained)
  2. Understanding Google Analytics Measurement ID (GA4)
  3. Google Signals GA4 – See Demographics (Gender, Age) in Google Analytics 4
  4. Using the GA4 (Google Analytics 4) Test Property
  5. Google Analytics 4 Sub Properties Tutorial
  6. Roll up Property in Google Analytics 4 (GA4) – Tutorial

#3 Google Analytics 4 Integrations

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. How to link Google Search Console to Google Analytics 4 (GA4)
  4. How to Install Google Analytics 4 on Shopify
  5. GA4 Firebase Integration – Correctly Add App Data Streams to GA4 Property

#4 Google Analytics 4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. Understanding Event Parameters in Google Analytics 4 (GA4)
  3. Recommended Events in Google Analytics 4 (GA4)
  4. Enhanced Measurement Events in Google Analytics 4 (GA4)
  5. Automatically Collected Events in Google Analytics 4 (GA4)
  6. How to Set Up GA4 Custom Events via Google Tag Manager
  7. Events Report in Google Analytics 4 (GA4)
  8. How to Rename Events in Google Analytics 4 (GA4)
  9. How to Use Google Analytics 4 Event Builder
  10. GA4 Form Interactions Tracking – Enhanced Measurement

#5 Google Analytics 4 Conversions

  1. Google Analytics 4 Conversion Tracking Guide – GA4 Goals
  2. How to Import Conversions from GA4 Property to Your Google Ads account
  3. GA4 Conversion Rate – How to find it and use it

#6 Google Analytics 4 Dimensions

  1. GA4 (Google Analytics 4) Dimensions Tutorial
  2. GA4 (Google Analytics 4) Custom Dimensions Tutorial
  3. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  4. Event Scoped Custom Dimensions in GA4 – Tutorial

#7 Google Analytics 4 Metrics

  1. GA4 (Google Analytics 4) Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 (Google Analytics 4) Custom Metrics Tutorial
  3. What are Predictive Metrics in Google Analytics 4 (GA4)

#8 Google Analytics 4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#9 Google Analytics 4 Specialized Tracking

  1. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  2. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  3. GA4 Site Search – Tracking Site Search in Google Analytics 4
  4. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 (Google Analytics 4) Data Import Tutorial
  7. Google Analytics 4 Content Grouping – Create Content Groups in GA4
  8. How to Track Single Page Apps in Google Analytics 4 (GA4)
  9. utm_source, utm_medium, utm_campaign Parameters – GA4 (Google Analytics 4)
  10. GA4 Form Tracking via Google Tag Manager

#10 Google Analytics 4 filters

  1. GA4 filters – Understanding Data Filters in Google Analytics 4
  2. How to Create and Test Filters in Google Analytics 4 (GA4)?
  3. Exclude Internal Traffic in GA4 (Google Analytics 4) via IP Filter

#11 Google Analytics 4 Explorations

  1. Free Form Report in GA4 (Google Analytics 4) – Exploration Report
  2. How to Use the User Lifetime Report in Google Analytics 4 (GA4)
  3. How to Use Path Exploration Report in GA4 (Google Analytics 4) – Path Analysis
  4. How to Use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to Use the Funnel Exploration Report in GA4 (Google Analytics 4) – Funnel Analysis
  6. Cohort Exploration Report in Google Analytics 4 (GA4)
  7. How to Create Landing Pages Report in GA4 (Google Analytics 4)
  8. How to Create Google Ads report in GA4 (Google Analytics 4)
  9. How to Segment GA4 Data by Data Stream
  10. Organic Search Traffic Analysis in GA4 – Complete Guide
  11. Google Analytics 4 (GA4) Outbound Links Tracking
  12. How to Track Email Campaigns and Traffic in GA4 
  13. How to view full page URLs in GA4?

#12 Google Analytics 4 Advanced

  1. Understanding Google Analytics 4 Sessions
  2. GA4 (Google Analytics 4) Measurement Protocol Tutorial
  3. How to Build Comparisons (Advanced Segments) in Google Analytics 4 (GA4)
  4. Understanding Automated Insights in Google Analytics 4 (GA4)
  5. Understanding Channel Groupings in Google Analytics 4 (GA4)
  6. Understanding Data Sampling in Google Analytics 4 (GA4)
  7. Google Analytics 4 Regex (Regular Expressions) Tutorial
  8. Google analytics 4 GDPR compliance checklist

#13 Google Analytics 4 Reports

  1. How to Create Custom Insights in Google Analytics 4 (GA4)
  2. How to Use Debug View Report in Google Analytics 4 (GA4)

#14 Google Analytics 4 Attribution

  1. Guide to Attribution Models in GA4 (Google Analytics 4)
  2. How to Change Attribution Models in GA4 (Google Analytics 4)?
  3. GA4 (Google Analytics 4) Conversion Paths Report in Attribution
  4. GA4 (Google Analytics 4) Model Comparison Report in Attribution
  5. Advertising Snapshot in GA4 (Google Analytics 4) Attribution
  6. GA4 Attribution Modelling Tutorial

#15 Google Analytics 4 Audiences

  1. GA4 Audiences – Creating Custom Audience in Google Analytics 4
  2. How to Create a Remarketing Audience in Google Analytics 4 (GA4)
  3. Understanding Audience Triggers in Google Analytics 4 (GA4)
  4. Google Analytics 4 (GA4) Predictive Audiences – Tutorial

#16 Google Analytics 4 BigQuery

  1. GA4 BigQuery – Connect Google Analytics 4 with BigQuery
  2. BigQuery GA4 Schema – Send Custom GA4 Data to BigQuery
  3. How to Backfill GA4 Data in BigQuery
  4. How to Connect and Export Data from GA to BigQuery

Frequently Asked Questions About Exclude internal traffic in GA4 via IP filter

What are data filters in Google Analytics 4?

Data filters are used to include or exclude event data (traffic) from your reports based on the event parameters value.

Using filters, you can exclude traffic coming to your website from your developers or internal employees. You can also use data filters to include only traffic coming from specific event parameter values.

These filters are configured at the property level and are applied to every data stream.

What are filter type in Google Analytics 4?

Currently, GA4 supports two types of filters:

1. Developer Traffic: Developer traffic is generated from your device while debugging the analytics implementation. GA4 defines developer traffic as the event data with the parameter name ‘debug_mode’ or ‘debug_event’ and parameter value ‘1’.

2. Internal Traffic: Internal traffic is the traffic coming to your website from your own employees, suppliers, and other service providers.

What is the IP filter in Google Analytics 4?

When you apply a data filter using an IP address, such filters are called IP filters. You can exclude or include traffic from a specific IP address. You can use the below conditions to define your IP address.

IP address equals: This option will match only one IP address. For example, ‘165.204.156.26’.

IP address begins with: This option will match all the IP addresses that begin with the provided input. For example, if you provide input as ‘165’, it will match ‘ 165.204.156.26’, ‘165.203.156.28’ but not ‘167.204.156.26’.

IP address ends with: This option will match all the IP addresses that end with the provided input. For example, if you provide input as ‘26’, it will match ‘ 165.204.156.26’, ‘167.203.155.26’ but not ‘165.204.156.28’.

IP address contains: This option will match all the IP addresses that contain the provided input. For example, if you provide input as ‘165’, it will match ‘ 165.204.156.26’, ‘190.165.156.28’ but not ‘167.204.156.26’.

IP address range: This option will match a range of IP addresses. For example, from ‘165.204.156.26 to 168.208.156.28’.

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade

Learn and Master Google Analytics 4 (GA4) - 126 pages ebook

X
error: Alert: Content is protected !!