Skip to content

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.

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:

Which bots reach your analytics in the first place?
Kind of botRuns your script?Shows up in script-based analytics?
Search and AI crawlers, uptime checks, link previewers, scrapers using plain HTTP clientsNoNo; see them in server or edge logs
Headless browsers that announce themselves (default Puppeteer, Playwright, Selenium)YesOnly if the tool does not check for them
Bots driving a real browser that hides automationYesYes, 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:

How do you spot bots that got through?
SignalWhat it looks likeWhere to check in GA4
One city or network, sudden spikeHundreds of users from one city that never sent traffic beforeDemographics by city, compared with the previous period
Zero engagementAverage engagement time near 0 s and an engagement rate near 0%Pages and screens (page path and screen class), Traffic acquisition
One landing page, directAll the extra sessions are direct to the home page or one URLLanding page with session source / medium
One unfamiliar referrerNearly all of the extra visits come from one promotional domainTraffic acquisition by session source
Odd technologyOne browser version, an unusual or (not set) screen resolution, an obsolete operating systemTech details
Perfect regularitySame number of sessions every hour, around the clockAn 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.

  1. 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.
  2. Annotate the period. Note the date range in your reporting so nobody reads the spike as growth later.
  3. 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.
  4. 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.
  5. 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.webdriver flag, 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:

How CrispStats filters bots
LevelWhat 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
StrictEverything in Standard, plus requests Cloudflare’s bot score rates as likely automated; a few real visitors on unusual setups may go uncounted
OffOnly 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.

Guide questions. Straight answers.

What people ask after reading this.

  • Yes. GA4 excludes known bots and spiders automatically, using Google's research and the IAB international spiders and bots list. You cannot turn this off, and GA4 does not show how much traffic it excluded.

  • No. GA4 data filters only apply to data that arrives after they are active, and their effect is permanent. For a past spike, use a report filter, comparison or segment that excludes the bot pattern, and annotate the period in your reporting.

  • The automatic exclusion covers bots that identify themselves. Bots that run a real browser with a normal user agent and hide their automation look like visitors to any script-based tool, so some still get through.

  • Generally no. Crawlers such as Googlebot or GPTBot fetch your pages without running analytics scripts the way a visitor's browser does, and known crawlers are excluded anyway. To see crawler activity, look at your server or CDN logs.

  • Look at engagement and outcomes. Real visitors scroll, click, view more pages and sometimes convert. A spike concentrated in one city or network, with near-zero engagement time, unusual screen sizes or browser versions, and no conversions is almost certainly automated.

Not answered here? Write to hello@crispstats.com

Go further

Free tools

  • AI crawler checker

    Check whether a site's robots.txt lets GPTBot, ClaudeBot, PerplexityBot and other AI crawlers in, by training, search and user fetch, with the deciding rule.

  • robots.txt generator

    Write a robots.txt file that allows or blocks each AI crawler, with presets by kind, private paths and a sitemap line.

  • Conversion rate calculator

    Work out your conversion rate from visitors and conversions: conversions ÷ visitors × 100.

Use cases

  • CrispStats for developers

    A small cookieless script with web vitals and error tracking, an npm SDK, a REST API and an MCP server, so your analytics fits the way you work.

  • CrispStats for indie hackers

    Traffic, revenue by source, uptime and errors for every side project in one dashboard.

  • CrispStats for bloggers

    See which posts get read to the end, where readers come from, including AI assistants, and keep your site free of analytics cookies.

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.