TRACKING SPECIALIST — BARIS ASA · LONDON
Synctag
Start the check → TRACKING SPECIALIST — BARIS ASA · LONDON

READING ROOM › SYMPTOM FILES › SYM-043

SYMPTOM FILE SYM-043 FILED 08 NOV 2026 · REVISED 22 NOV 2026

How to exclude internal and bot traffic in GA4: the setup in order, and the test before you switch it on.

ALSO FILED AS
  • “how to exclude internal and bot traffic in GA4”
  • “how to exclude bot traffic in GA4”
  • “GA4 exclude my own IP address step by step”
  • “GA4 internal traffic filter testing or active”
  • “GA4 test data filter name exploration”
  • “GA4 exclude staff working from home”
  • “GA4 exclude internal traffic dynamic IP address”
  • “GA4 exclude GTM preview traffic”
  • “GA4 test orders showing as revenue”

Baris Asa, tracking consultant, London · Last checked: 22 November 2026

If your own team, agency or test orders are in GA4, sessions and revenue read higher than they should. To exclude internal and bot traffic, do four things in order: add IP rules under Define internal traffic, mark staff an IP rule can’t see with a cookie, run the Internal Traffic data filter in Testing, then set it to Active (permanent). Google already excludes known bots; scripts that run your tag need the steps below.

Check yours: Admin, Data collection and modification, Data filters. If no Internal Traffic filter shows Active, office visits and any test orders placed from the office are in your numbers. One showing Testing has removed nothing. Not sure which filters exist? A GA4 audit is read-only and written up.

The order matters because Active can’t be undone. Switched on untested, a filter can remove real customers’ visits for good. Left in Testing, it removes nothing. Both are on record under F-602 .

Why the office ends up in the numbers, and how to diagnose it, is the F-602 Atlas entry (F-602 ). This note is the setup, with a check for each step. If test orders are your problem, go to Test orders and Google Ads.

Before you start: three lists

Ten minutes of collecting saves a permanent mistake.

  1. Who visits on purpose and isn’t a customer. The office, the agency, developers, staff at home, anyone placing test orders.
  2. Every hostname real customers use. In Explore, a free-form exploration with Hostname as rows and Sessions as values, last 90 days. Mark which are live (shop, checkout, regional or translated domains) and which are test (staging, dev, preview, localhost).
  3. What runs the tag and isn’t a person. Uptime monitors, test scripts, the crawler your SEO team runs. Ask. Nobody volunteers it.

You need Editor access or above on the GA4 property. A property allows 10 data filters, so plan them before creating any.

Step 1: define internal traffic by IP

Who: anyone with Editor access. No code.

Admin, Data collection and modification, Data streams, your website, Configure tag settings, Show more, Define internal traffic, Create.

  • One rule per network. The office, the agency. “What’s my IP address?” in the rule editor shows the address you’re on now.
  • Ranges and IPv6. Use “is in range” with CIDR notation (a block of addresses written as one entry, such as 203.0.113.0/28) for a network with several addresses. Add the IPv6 address as well as IPv4. Conditions within one rule are OR, not AND.
  • Dynamic IPs. An IP rule matches the address a visit arrives from, so a home or small-office connection that changes address stops matching without warning. Google’s page doesn’t cover this case. A CIDR range for your provider’s whole block would catch the change but also strangers on that block, so I don’t use one for a residential line. Use the cookie in step 2 for anyone whose address moves, and keep IP rules for fixed office addresses.
  • Keep the value internal. GA4 lets you type another traffic_type value per rule, but the filter in step 3 matches a single value. Rules labelled office_london and a filter matching internal exclude nothing.

A rule only labels events. Your reports don’t change yet.

Check: from each office, open the rule editor’s “What’s my IP address?” and confirm the address falls inside a rule.

Step 2: mark the staff an IP rule can’t see

Who: whoever manages your Google Tag Manager container (about 30 minutes; steps 1, 3 and 4 need no code). Without GTM, ask your developer to set traffic_type to internal on the GA4 config when the staff_browser cookie is present. The result: each person marks their browser once and is excluded on any network, home broadband, hotspot or VPN.

Google lets you add traffic_type to events yourself. In GTM:

  1. A tag that sets the cookie. A Custom HTML tag (a few lines of your own JavaScript) that writes a first-party cookie (a cookie on your own domain), such as staff_browser=1, with a one-year expiry. Trigger: Page View, where Page URL contains staff=1.
  2. A variable that reads it. A 1st-Party Cookie variable for staff_browser.
  3. A variable that turns it into the label. A Lookup Table variable with the cookie variable as input: 1 returns internal. Leave the default value unset, so visitors without the cookie send no traffic_type at all.
  4. The label on every hit. On the Google tag, add the configuration parameter traffic_type with the Lookup Table variable as its value. Publish.

Each person opens yoursite.co.uk/?staff=1 once per browser. Clearing cookies undoes it, so put the link in the staff handbook.

If your tags run through a server-side container (a GTM container on your own server), check how it treats the visitor’s IP. Set up to hide or replace it, the IP rule can’t match, and this cookie route is the one that works.

Check: with the cookie set, open GTM Preview and confirm the Google tag sends traffic_type with the value internal.

Step 3: create the filter in Testing, and read it

Who: Editor access. No code.

Admin, Data collection and modification, Data filters, Create Filter, Internal Traffic. Name it, choose Exclude, enter internal as the traffic_type parameter value, set the state to Testing, save.

Testing removes nothing. It labels every matching event with the filter’s name, in a dimension called Test data filter name. In practice it labels only events collected after you save, so visit the site from each office and from one marked browser. After 24 to 36 hours:

  1. Explore, Free form.
  2. Rows: Test data filter name, then Event name. Values: Event count.
  3. Filter: Test data filter name contains your filter name.

Check: the labelled rows are your own visits and nobody else’s. Add City and Device category to be sure. Empty 36 hours after those visits means the rule isn’t matching: the address is wrong, the values differ, or something between the visitor and GA4 changes the address it sees.

Test the other two filter types the same way before activating either:

  • Developer Traffic removes events sent in debug mode, which GTM Preview and Tag Assistant switch on. If debug_mode is set on the Google tag for every visitor, this filter removes every visitor. Setting it to false does not turn it off, according to Google: the field has to be deleted.
  • Web hostname traffic can Exclude your test hostnames or Include only your live ones. Use Exclude. Include only drops any live hostname missing from your list.
Filter (Testing)What it labelledVerdict
Internal trafficoffice and agency visits only; no home-browser rows: cookie not set yetactivate, then fix step 2
Developer trafficevery event on the site: debug_mode set for alldo not activate
Web hostname, Excludestaging hostname onlyactivate
GA4 · Explore, Test data filter name × Event name · three filters in Testing, 36 hours in · what the test caught · reconstructed from a test property, not a client account

The second row is what the test is for. Switched straight to Active, that filter would have emptied the property from that day on, with no way back.

Step 4: switch to Active, and write the date down

Open each filter that passed, set Filter state to Active, save. It starts filtering within 24 to 36 hours.

  • It is permanent. Google says excluded data is never processed and isn’t available in Analytics or in the BigQuery export. Switching the filter off later brings nothing back.
  • It only works forwards. Older data keeps your own visits. Every chart that crosses the go-live date shows a drop that is not a drop. Note the date and the share of sessions removed on the dashboard (R-501 ) and in the tracking documentation (F-501 ).

Check: two days after activation (a margin on Google’s 24 to 36 hours), open a page almost nobody visits, from the office and from a marked home browser. It should not appear in the next day’s Pages and screens report.

How do I exclude bot traffic in GA4?

Known bots are handled for you. Google excludes them automatically, using its own research and the IAB International Spiders and Bots List. You can’t turn that off or see how much it removed. A crawler that doesn’t run JavaScript never triggers your browser tag.

What reaches your reports is automation that runs your tag and isn’t on the list. GA4 has no bot filter you can configure, so the work happens around it:

  1. Find it by behaviour. In Explore, add Landing page, Browser, City and Engagement rate. Sessions piled onto one landing page and one browser, with engagement near zero, arriving in bursts or on deploy days, are scripts. Your server or CDN logs show the same requests with their user agents.
  2. Stop your own at the source. Add a trigger exception (a rule that blocks a tag) on the monitor’s user agent, or point the monitor at a page without the tag.
  3. Block the rest before the page loads with your CDN’s bot controls. Then rerun step 1.
  4. Label what you can’t call yet. In GTM, send a second traffic_type value, bot_suspect, when the browser reports signs of automation. navigator.webdriver returning true tends to be one such sign; older headless builds typically also put HeadlessChrome in the user agent. Bots can spoof both, so neither catches everything.
  5. Keep both values. If you also use the staff cookie, one Custom JavaScript variable has to return both values (internal first, then bot_suspect), or one overwrites the other.
  6. Filter, but only in Testing. Create a second Internal Traffic filter matching bot_suspect and leave it there (Google’s help doesn’t document two Internal Traffic filters side by side, so confirm both save in your property). The hits stay in your reports, labelled in Test data filter name, so you can compare totals with and without them before deciding anything.

I label rather than delete, so the evidence stays to tune the rule. I run it that way on a job board, on record in How I set up tracking for a job board on Cloudflare Workers.

Test orders and Google Ads

A data filter acts on GA4’s data and nothing else. Because excluded events are never processed, a test purchase the filter removes leaves nothing for Google Ads to import as a conversion from GA4. A Google Ads conversion tag on the same thank-you page sends straight to Google Ads, so the GA4 filter never sees it, and the test order counts there.

Place test orders on staging. Or add the staff cookie from step 2 as a trigger exception on the Google Ads tag.

Test orders counted as real revenue in the ad platforms are filed under F-302 . Counted as a real key event in GA4, they overlap with F-104 .

How do I know it’s done?

  • Every exclusion filter shows Active, the bot_suspect filter stays in Testing by design, and each go-live date is written where people will read it.
  • Office and home-browser visits don’t show in the next day’s reports, while GTM Preview visits still show in DebugView if you use the Developer Traffic filter.
  • The Hostname exploration shows only live hostnames from the go-live date.
  • The bursts of one-page, one-browser, zero-engagement sessions have stopped, or are labelled bot_suspect.

If DebugView looks empty after you activate a filter, read why GA4 DebugView is empty before you switch the filter off.

When nobody can say which filters exist or which months include the office, a GA4 audit (read-only, written findings) checks both. The fix is a piece of work I take on from there. The fault itself is filed as F-602 .

Common questions

How do I exclude internal traffic in GA4?

Add your office and agency IP addresses under Define internal traffic on the web data stream, keeping the traffic_type value internal. Create an Internal Traffic data filter set to Exclude, leave it in Testing, check the Test data filter name exploration after 24 to 36 hours, then set it to Active. Until it is Active, nothing is excluded.

How do I exclude bot traffic in GA4?

Known bots are already excluded, and GA4 has no bot setting you can change. For automation that runs your tag, stop your own monitors in GTM, block the rest at your CDN, and label the doubtful hits with a second traffic_type value kept in a filter that stays in Testing.

What if our office has a dynamic IP address?

An IP rule only matches the address the visit comes from, so it fails when the address changes. Google’s help page doesn’t address dynamic IPs. Use the staff cookie from step 2, which follows the browser rather than the network, and check the filter’s Test data filter name rows again after any change of provider or router.

Should I leave the filter in Testing or set it to Active?

Testing until the exploration shows only your own traffic, then Active. Testing counts everything and only labels it. Active removes matching events for good, from reports and from the BigQuery export.

How do I exclude staff who work from home?

With a cookie, not an IP. A private URL sets a first-party cookie in the staff member’s browser, and GTM sends traffic_type internal whenever that cookie is present. The existing Internal Traffic filter then excludes them on any network.

Does the GA4 filter stop test orders reaching Google Ads?

Only the conversions Google Ads imports from GA4. A Google Ads conversion tag sends straight to Google Ads, so the GA4 filter never sees it. Place test orders on staging, or block that tag for staff browsers.

Can I clean internal traffic out of past months?

No. Data filters only act on data collected after they go Active. For older dates, compare with a report filter on what you can identify, such as the office city or a staging hostname, and record the go-live date.

Sources

Read on 22 November 2026:

  • Google Analytics Help, Filter out internal traffic (Admin, Data collection and modification, Data streams, Configure tag settings, Show more, Define internal traffic; traffic_type internal by default, custom values allowed; match types including “is in range” for CIDR and regular expressions; IPv4 and IPv6; “What’s my IP address?”; conditions are OR; the parameter can be added to events manually; Internal Traffic filter set to Exclude; Testing labels data in Test data filter name; free-form exploration check; 24 to 36 hours; up to 10 data filters; not for app users; Editor or above)
  • Google Analytics Help, Data filters (developer, internal and web hostname types; evaluated from creation forward, no effect on historical data; excluded data never processed and never available in Analytics or BigQuery; report filters to hide data without removing it)
  • Google Analytics Help, Filter out developer traffic (excludes activity sent in debug mode while DebugView keeps working; Testing, Active and Inactive states; same exploration check)
  • Google Analytics Help, Filter web hostname traffic (Exclude or Include only; exactly matches, begins with, ends with, contains; validate after 24 to 36 hours; begins filtering within 24 to 36 hours of activation; applies only to new data)
  • Google Analytics Help, Known bot-traffic exclusion (automatic; Google research and the IAB International Spiders and Bots List; can’t be turned off; excluded volume not shown)
  • Google Analytics Help, Monitor events in DebugView (Tag Assistant and GTM preview mode turn on debug mode; debug_mode can be set on the Google tag for all events; setting it to false does not disable it, the field must be removed)

← back to the reading room