Web and product analytics
How to exclude internal traffic in GA4
The short answer
In GA4, go to your web data stream, Configure tag settings, Show more, Define internal traffic, and add your office IP addresses (traffic_type internal). Then go to Admin, Data filters, create an Internal Traffic filter set to Exclude, leave it in Testing to check it, and switch it to Active. Active filters are permanent: excluded data is never processed, so test first.
On this page 6 sections
Why bother
A small business site may get a few hundred visits a week, and the owner, staff and agency checking the site can be a meaningful share of them. They visit the contact page, submit test forms and click every button, which inflates engagement and key events. Exclude them before you read any report that matters.
Step 1: define internal traffic
- Admin, Data streams, open your web stream, Configure tag settings, then Show more.
- Click Define internal traffic, then Create.
- Name the rule. Leave traffic_type as internal (or use a value such as office_london if you want separate rules).
- Choose a match type for IP address: equals, begins with, ends with, contains, is in range (CIDR notation, IPv4 or IPv6) or matches regex. Enter your office's public IP; searching "what is my IP" from the office network shows it.
- Create. You need Editor access on the property.
Step 2: create and test the filter
- Admin, Data filters, Create Filter, Internal Traffic.
- Name it (up to 40 characters), choose Exclude, and match the traffic_type value from step 1.
- Leave it in Testing. Matching data is labelled with the Test data filter name dimension, so in an exploration you can see how much traffic it would remove.
- When the numbers look right, switch it to Active. It can take 24 to 36 hours to take effect.
Remote teams, agencies and developers
- Home broadband IPs change. An IP rule cannot reliably catch remote staff. Options: have staff use a company VPN with a fixed exit IP, or set traffic_type from GTM for logged-in staff (for example a cookie set on your admin login), sent as an event parameter.
- Agencies should give the client their office IP ranges, or test on a staging property rather than live.
- Developer traffic: GA4 has a separate Developer traffic filter that removes events sent with debug_mode (DebugView sessions). Activate it so test sessions do not reach reports.
- Bots are excluded by GA4 automatically using known bot lists; you cannot see or change that list.
Next: set up the events that matter, and if your numbers still look off, read why GA4 numbers don't match.
Questions
- Does a GA4 internal traffic filter remove past data?
- No. Filters apply to data processed after the filter becomes active. Once active, the excluded events are never processed and cannot be recovered, which is why Google provides a Testing state to check the filter first.
- How many data filters can a GA4 property have?
- Up to 10 data filters per property, across internal traffic and developer traffic filters.
Sources
Next step
Explore web analytics
Related guides
How to set up event tracking in GA4
GA4 event tracking step by step: automatic, enhanced measurement, recommended and custom events, key events, custom dimensions, and how to test them.
How to set up Google Tag Manager (and GA4 through it)
Google Tag Manager set-up step by step: account and container, the two snippets, the Google tag for GA4, preview with Tag Assistant, and publishing versions.
Why GA4 numbers don't match Google Ads, Shopify or your CRM
The usual reasons GA4 disagrees with Google Ads, Shopify, Search Console and your CRM: consent, ad blockers, attribution, dates, thresholds and definitions.
How to set up cross-domain tracking in GA4
GA4 cross-domain measurement step by step: where the setting lives, the _gl parameter, how to test it, self-referrals, and the redirects and scripts that break it.