Sunday, 31 December 2023 22:18

GA4 IP Filters

Written by
Rate this item
(0 votes)
Define Internal Traffic with an IP Address Define Internal Traffic with an IP Address
 

How to Filter by IP Address in GA4?

A common process in keeping your GA4 data accurate is removing internal traffic.  The most common way to do that is by filtering out this traffic by IP Address.  This article will step through how to complete this process.

 

How to Define Internal Traffic using an IP Address?

The first step of this process is defining internal traffic using an IP Address.  We will use an example IP Address of 123.456.78.9 - you can find the right IP Address by typing in "What is my IP" in Google search or check with your network team to find a range of IP Addresses. 
Now navigate to the "Define internal traffic" page.  ( Admin -> Data streams -> click on Data Stream -> Configure tag settings -> click "Show more" -> Define internal traffic ) and you will see this screen:
 
 ga4 ip filtering define internal traffic
After clicking on the creat button you will see this screen:
ga4 ip filtering defininf internal traffic with an ip address 
Defining Internal Traffic by an IP Address 
Enter in a unqiue name for your "Rule name".  Notice that "traffic_type" value is defined as "internal", this is what will be used in the filter step to filter out this traffic.  You can create new "traffic_type"s at this point as well if you would like different filters, keeping in mind that there are a maximum of 10 filters allowed. 
Next select the "Match type", in this case we have selected "IP adress matches regular expression", there are other choices as well including "IP address is in range (CIDR notation)" - look here to learn more about this match type - https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing.  In the "Value" field we have coppied in our IP address and then add "\" before the "." to make it clear that we mean a period "." in our IP Address.  (The period character means a single character wildcard, using the backslash, "\", escapes the period to indicate that we mean an actual period and not a wildcard.  We will be providing a brief Regular Expression article to provide the basics that will help your GA4 analysis.  To read more - https://en.wikipedia.org/wiki/Regular_expression

How to Create a Filter in GA4?

The next step is creating (or in most cases editing) your internal traffic filter.  First navigate to Admin -> under "Data Collection and modification" click on Data filters.  From here you can Edit your "Internal Traffic" filter, or click the "Create" button to start.  You will see this:

ga4 ip filtering internal traffic filter

If the "Data filter name" is not set fill in a unique name.  Next notice that the "Parameter name" is set to "traffic_type" and the "Parameter value" is set to "internal" - in most case we can leave these alone, if you want to create additional custom filters - then the Parameter and Value will allow you to customize these settings.

Finally we will want to select the "Active" filter state - this will ensure that the traffic is permanently filtered out.  (If you only want to filter the data from reports, but want the data available, try Report Filters - here is an introduction to Exclude Filters.)  When you are complete click on the "Save" button and then click on "save filter" on the next warning that filters are destructive and irreversable.  Make sure you test your filters - to ensure no data is lost.

References:

Google Article on Filtering Internal Traffic - https://support.google.com/analytics/answer/10104470?hl=en

Google Article on Regular Expressions in Google Analytics - https://support.google.com/analytics/answer/1034324?hl=en

 

Additional Info

  • Browser Title: GA4 IP Filters | Optimizing Data Accuracy in GA4: A Complete Guide to IP Filters
Read 159 times Last modified on Friday, 05 January 2024 15:10
Jay Murphy

Jay Murphy is a digital analytics expert and founder of Trionia, where he specializes in transforming data into actionable insights for large and mid-sized businesses. With over thirty years of experience and a passion for Google Analytics since its inception, Jay has honed his skills to bridge the gap between technical data analysis and strategic business planning. An educator at heart, he has developed and taught comprehensive digital marketing courses at both the undergraduate level and within organizations, enriching minds with his deep understanding of the digital analytics landscape.

His career, which began in systems analysis for spacecraft guidance, has evolved through roles that blend technical acumen with strategic vision across various sectors, including Fortune 500, Higher Education and Non-Profits. Certified in Google Analytics since 2011, Jay's leadership at Trionia has spearheaded successful online campaigns and innovative marketing strategies, underlining his commitment to leveraging data for growth. Jay's approach goes beyond the numbers; he's a storyteller who uses data to drive business success, making him a pivotal figure in the digital marketing world.

Media

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.