Setup and data
How to remove bot traffic from Google Analytics and other tools
GA4 removes known bots automatically, but some still get through. How GA4 and privacy-first tools filter bots, how to spot the rest, and what to do.
The CrispStats team · · 8 min read
In short
Google Analytics 4 already removes known bots and spiders automatically, using Google’s research and the IAB international spiders and bots list, and you cannot switch that off or see how much it removed. What still gets through are bots that run a real browser and hide it. You cannot delete them from data GA4 already collected, so the practical steps are to spot the pattern, exclude it with a report filter for past dates and a data filter for future ones, and block it before it reaches the tracking script.
On this page · 7 sections
Sections
A sudden spike of visitors from one city, all with zero seconds of engagement, is the classic sign. It is rarely a sign that analytics is failing: most automated traffic never shows up in a script-based tool at all. The 2025 Imperva Bad Bot Report estimated that automated traffic made up 51% of all web traffic in 2024, and 37% came from bad bots. Bots that only fetch HTML or call APIs never run your analytics script. The ones that do are the ones this guide is about.
Which bots reach your analytics in the first place?
A tracking script only counts a visit if a browser loads the page and runs the JavaScript. That splits bot traffic into three groups:
| Kind of bot | Runs your script? | Shows up in script-based analytics? |
|---|---|---|
| Search and AI crawlers, uptime checks, link previewers, scrapers using plain HTTP clients | No | No; see them in server or edge logs |
| Headless browsers that announce themselves (default Puppeteer, Playwright, Selenium) | Yes | Only if the tool does not check for them |
| Bots driving a real browser that hides automation | Yes | Yes, and this is the hard part |
So “remove bot traffic” in analytics really means removing the last two groups. Crawlers such as Googlebot or GPTBot belong in a separate report built from logs, never in your visitor numbers.
How does GA4 filter bot traffic?
GA4 excludes known bot and spider traffic automatically. Google identifies it using a combination of its own research and the IAB/ABC International Spiders and Bots List. Two details matter:
- You cannot turn it off. There is no setting, and nothing to configure.
- You cannot see what was removed. GA4 does not report how much known bot traffic it excluded.
That list is built for bots that identify themselves. A bot that uses an ordinary browser user agent and behaves like a person is not on it.
For the rest, GA4 has data filters. The internal traffic filter excludes IP addresses or ranges and is meant for your own team. The newer Custom condition traffic filter is meant for bots: Google describes it for scrapers and headless browsers that mimic normal browsers, and it excludes future events that match a combination of city, region, country, browser and version, operating system, screen resolution, device, source, medium or page path. Google says it is rolling out gradually and may only be visible to eligible properties, and a property can have up to 10 data filters.
Every data filter works only on data that arrives after it is active, and its effect is permanent: excluded events are never processed and never reach explorations, the Data API or BigQuery. For past dates, Google points you to filters on reports instead, which hide data without removing it.
How do you spot bots that got through?
Look for traffic that is too uniform to be human. Google’s own filter guide lists the same patterns as the table below:
| Signal | What it looks like | Where to check in GA4 |
|---|---|---|
| One city or network, sudden spike | Hundreds of users from one city that never sent traffic before | Demographics by city, compared with the previous period |
| Zero engagement | Average engagement time near 0 s and an engagement rate near 0% | Pages and screens (page path and screen class), Traffic acquisition |
| One landing page, direct | All the extra sessions are direct to the home page or one URL | Landing page with session source / medium |
| One unfamiliar referrer | Nearly all of the extra visits come from one promotional domain | Traffic acquisition by session source |
| Odd technology | One browser version, an unusual or (not set) screen resolution, an obsolete operating system | Tech details |
| Perfect regularity | Same number of sessions every hour, around the clock | An exploration by hour |
One of these alone proves little: a mention in a newsletter can also bring a spike from one city. Two or three together, especially zero engagement plus odd technology, are a strong sign. GA4 engagement rate explained covers the engagement metrics, and direct traffic in GA4 explains why scripted visits so often land in Direct.
How do you remove bot traffic from GA4 reports?
You cannot delete what was already collected, so you hide it for the past and exclude it for the future.
- Filter the past in reports. Add a report filter, comparison or segment that excludes the pattern, for example the city and browser version you identified, and compare the result with the unfiltered report. Use the filtered view for decisions about that period.
- Annotate the period. Note the date range in your reporting so nobody reads the spike as growth later.
- Exclude the future with a data filter. If your property has the Custom condition traffic filter, build it from the exact values you found, in the Testing state first. If the traffic comes from addresses you can name, an internal traffic filter by IP also works.
- Stop it before the script. A firewall or bot management rule at your CDN or host blocks the requests before the page loads, which keeps them out of every tool at once.
- Check what changed on your side. A load test, an uptime tool that renders pages, or a staging site sending data to the production property all look like bots. Exclude your own tools first.
How do privacy-first tools filter bots without cookies?
Tools that use no cookies and store no IP addresses cannot build a long behavioural profile of each visitor. They filter on what each request says about itself, in two places:
- In the browser. The script checks whether the browser reports that it is automated (the
navigator.webdriverflag, set by Selenium, Puppeteer and Playwright in their default modes) and sends nothing if so. It can also wait until a prerendered page is actually shown. - At the collector. The server that receives events checks the user agent and request headers: self-identified bots, HTTP clients, link previewers, prefetch requests. Where the collector runs on a CDN with a bot score, it can drop requests the CDN rates as automated.
The limit is the same as GA4’s. A bot that drives a real browser, hides the automation flag and sends a normal user agent looks like a visitor to every script-based tool. Only behaviour over time, or a challenge before the page loads, catches it.
What still gets through, whichever tool you use
- Stealth headless browsers with the automation flag removed.
- Click farms and paid traffic schemes using real devices and real people.
- Bots on residential IP addresses, which look like ordinary home connections.
- Your own tools, such as page speed tests or screenshot services, unless you exclude them.
That is why a sudden, unexplained jump should be treated as suspect until engagement and conversions confirm it. Real visitors read, scroll, click and sometimes buy. A spike with none of that is noise.
How CrispStats filters bots
CrispStats filters in both places described above. The script sends nothing when navigator.webdriver is true or the page runs inside Cypress, and waits for a prerendered page to be shown. The collector then drops events by its bot filtering level, which you choose per site under Settings:
| Level | What is dropped |
|---|---|
| Standard (default) | Self-identified bots, headless browsers and automation tools, link previewers, HTTP clients, requests without a browser user agent, prefetch and prerender requests, and bots Cloudflare verifies |
| Strict | Everything in Standard, plus requests Cloudflare’s bot score rates as likely automated; a few real visitors on unusual setups may go uncounted |
| Off | Only AI crawlers |
AI crawlers are never counted as visitors at any level. You can report their hits from your server and see them on the AI traffic page, apart from your visitor numbers. You can also exclude paths and IP addresses, which is the right place for your own monitoring tools. The full rules are in the bot filtering docs.
The honest limit: the rules target software that announces itself. A bot that runs a real browser and hides it can still be counted, and events already stored are not recounted when you change the level.