How to Exclude Bot and AI-Agent Traffic in GA4 (2026 Guide)
If you want to exclude bot traffic in GA4, the built-in tools only take you part of the way. Google Analytics 4 (GA4) quietly removes bots on a known list, gives you filters for your own team, and leaves everything else in your reports, including AI agents that browse your site in real browsers. This guide walks through each GA4 setting that actually helps, what it can and cannot remove, and what to do about the traffic GA4 will never flag on its own.
What GA4's known-bot exclusion does and cannot do
Every GA4 property already filters some automation. According to Google's help article on known bot-traffic exclusion, traffic from known bots and spiders is excluded automatically, identified "using a combination of Google research and the International Spiders and Bots List, maintained by the Interactive Advertising Bureau." The same page states that "you cannot disable known bot traffic exclusion or see how much known bot traffic was excluded."
That has three practical consequences:
- It is list-based. It catches automation that identifies itself. It does not catch software that presents a normal browser user agent from an ordinary consumer IP address.
- It is invisible. There is no report of what was removed, so you cannot reconcile it against ad clicks or server logs.
- It is not configurable. You cannot add your own bot signatures to it.
The gap is growing. Imperva's 2026 Bad Bot Report found automated traffic accounted for more than 53% of all web traffic in 2025, up from 51% the year before, and describes AI agents as systems that "interact with" websites and "increasingly act on behalf of users." Much of that automation never runs your GA4 tag, but the kind that does is exactly the kind a list misses.
How to exclude bot traffic in GA4 with data filters
Data filters are GA4's only tool that removes events before they are processed. Google's GA4 data filters overview lists three types: developer traffic, internal traffic and web hostname traffic. All of them live under Admin, then Data collection and modification, then Data filters, and a property can have up to 10.
Treat them with care. Google's internal traffic filter guide warns that once a filter is applied "the effect on the data is permanent," and excluded data is never available in Analytics or BigQuery. Always start a filter in the Testing state, which tags matching events with the "Test data filter name" dimension so you can check what would be removed before you switch it to Active.
Internal traffic
First you define the traffic, then you filter it:
- In Admin, under Data collection and modification, open Data streams, choose your web stream and click Configure tag settings.
- Click Show more, then Define internal traffic, then Create. Name the rule, keep the traffic_type value (internal by default) and enter your office or VPN IP addresses or ranges.
- Back in Admin, open Data filters, click Create Filter, choose Internal Traffic, select Exclude and save it in Testing.
This removes your team, your agency and your QA vendors. It will not remove bots, because bots do not come from your IP addresses.
Developer traffic
Google's developer traffic filter guide explains that this filter excludes events sent in debug mode, so you can keep testing tags in DebugView without polluting reports. Create it the same way and choose Developer Traffic as the filter type. Google notes that filters take 24 to 36 hours to apply once active.
Web hostname traffic
Google's web hostname traffic filter guide describes a filter that excludes events whose hostname matches values you enter, using "Exactly matches" or "Contains." It is useful when your measurement ID fires on staging sites, translation proxies or scraped copies of your pages. Google's page documents the exclude option; GA4 Optimizer's hostname filter walkthrough reports that an include (allowlist) option arrived in September 2026, so check which choices your property shows.
Unwanted referrals are not a bot filter
The List unwanted referrals setting (in your web stream under Configure tag settings) is often mistaken for a spam filter. Google's unwanted referrals article explains that it adds ignore_referrer=true to matching events so the referrer "should not be displayed as a traffic source." The sessions stay in your reports; only the attribution changes. Use it for payment gateways and single sign-on domains, not for bots.
Segments, comparisons and custom channel groups: analyze before you delete
Because data filters are permanent and narrow, most bot work in GA4 should happen in non-destructive views. Google's segment builder documentation describes segments as "fully retroactive" subsets used in Explorations, with up to four segments applied to a technique at once. Comparisons in GA4 reports do a similar job inside standard reports, letting you view subsets side by side.
The rule of thumb: use data filters only for traffic you are certain you never want (your team, your staging hosts). Use segments and comparisons for anything you are still judging, including suspected bots.
Separate AI assistant referrals with a channel group
GA4's default channel group now includes an AI Assistant channel for visitors arriving "from sources like ChatGPT, Gemini, Deepseek, Copilot, or Grok," excluding Google's AI Overviews and AI Mode. MarTech's May 2026 report on the AI Assistant channel notes that Google has not published a full list of AI referrers, and that copied links or in-app browsers can still land in Direct.
If you need control over which assistants count, build your own. Per Google's custom channel groups guide, go to Admin, then Data display, then Channel groups. Standard properties get two custom groups, each group can hold 50 channels, and the groups apply to reports retroactively. Two tips:
- Traffic joins "the first channel whose definition it matches," so place your AI channel above Referral.
- Test any source regex against your real source list before saving. Broad patterns can sweep in unrelated domains.
Keep in mind what this channel measures: a person clicking a link inside an AI assistant. It says nothing about AI agents that visit your site themselves, which is the harder problem covered below.
Build an exploration segment for suspect traffic
Create a session segment in Explore and combine conditions that rarely describe real buyers. Useful starting points:
- Engagement: Session engaged equals 0, or near-zero engagement time from a single landing page.
- Hostname: any hostname that is not your production domain.
- Geography: countries you do not sell to or advertise in.
- UTM anomalies: paid source or medium with a missing or (not set) campaign, campaign names you never created, or UTM values in the wrong case.
- Technology: unusual browser versions or screen resolutions that suddenly spike.
Compare the segment against all users by channel and by key event. If a paid channel's conversion rate changes sharply once the segment is excluded, you have found where the problem is concentrated.
Why AI agents in real browsers need server-side or edge classification
GA4 only sees what its JavaScript tag reports. An agentic browser runs that tag like any other browser. HUMAN's April 2026 State of Agentic Traffic found that browser-based agents such as Perplexity's Comet and OpenAI's Atlas made up roughly 71% of observed agent activity, arriving "with user-agent strings, cookies, and session patterns that closely resemble human browsing." HUMAN's June 2026 update adds that product and search routes accounted for 79% of agent activity, which are the same pages your campaigns send people to.
The signals that separate those visits sit in the request itself, not in GA4. For example, OpenAI's ChatGPT agent allowlisting guide says its cloud browser signs requests using HTTP Message Signatures (RFC 9421) with a Signature-Agent header. Headers, IP reputation, network type and request timing are visible to your server, content delivery network or an edge script, and none of them are GA4 dimensions by default.
That is why reliable agent handling means classifying each visit where the request arrives, then deciding whether to allow, label or block it. For the signals themselves, see our guide on how to tell AI agents, bots and humans apart, and for which agents are worth welcoming, read agentic AI traffic, the good and the bad.
What to do with Google Ads conversions
Cleaning GA4 reports does not clean your bidding signals. If you import GA4 key events into Google Ads or run the Google Ads conversion tag, bot and agent conversions can still train Smart Bidding. Steps worth taking:
- Use conversions you can verify. Prefer qualified leads or completed purchases over form views or button clicks that automation can trigger.
- Retract bad conversions. Google's conversion adjustments documentation describes retractions that "permanently remove a conversion," which for online conversions requires a transaction ID. Send an order or lead ID with every conversion so you have that option.
- Exclude repeat offenders. Google Ads IP exclusions allow up to 500 addresses per campaign, but are not available for Performance Max or App campaigns, and proxy traffic rotates IPs quickly.
- Request credits. Google's invalid traffic overview says advertisers can submit an investigation request through the Click Quality Form for activity within the last 60 days.
Checklist: cleaning bot and AI-agent traffic out of GA4
- Define internal traffic by IP and create an internal traffic filter in Testing, then Active.
- Create a developer traffic filter so debug-mode events stay out of reports.
- Exclude staging and unknown hostnames with a web hostname filter.
- List payment and login domains as unwanted referrals, and nothing else.
- Build a custom channel group with an AI assistant channel placed above Referral.
- Save a suspect-traffic segment (low engagement, wrong hostname, out-of-geo, UTM anomalies) and review it weekly.
- Classify agents and proxies at the server or edge, where request-level signals exist.
- Pass transaction IDs with conversions so you can retract bad ones in Google Ads.
Where Ðeny fits
GA4 can hide some bad traffic; it cannot tell you what each visitor was. Ðeny adds one line of script to your site and classifies traffic in real time. The Ðeny Intelligence Hub labels every visit as Clean, Good Bot, Residential Proxy, IVT (invalid traffic), Out-of-Geo or AI Agent, and summarizes overall quality with a Traffic Health Score from A to F. The UTM Breakdown shows those categories per channel and campaign, so you can see which sources are sending agents, proxies or out-of-market traffic before you scale spend, and Ðeny Bot Shield can block the traffic you decide you do not want.
Set up GA4's filters, segments and channel groups first; they are free and worth having. Then add request-level classification for the traffic GA4 cannot see. Explore Ðeny's traffic classification features or request a demo of Ðeny to see your own site's traffic split by category.
Start protecting your funnel today
Put Ðeny to work from day one, and your boss will thank you.

