Bot traffic in GA4: spotting it in BigQuery when the interface doesn't filter it
Bot traffic in GA4 is filtered only when Google already knows the bot. Everything else reaches the BigQuery export, where four SQL signatures find it after the fact. On Google's public sample, they flag 2,525 of 118,380 January sessions, but only 14 purchase events. This method completes our guide to trusting your GA4 numbers.
What does GA4's bot filter remove, and what does it leave?
GA4's bot filter removes traffic from known bots and spiders, and nothing else. Google identifies them with its own research and the IAB International Spiders and Bots List.
Known bot-traffic exclusion is the automatic GA4 filter that removes hits from bots and spiders identified by Google research and the IAB International Spiders and Bots List, before reports and before the BigQuery export, with no setting to disable it and no count of what it removed.
The filter acts at collection, so the export cannot show what it removed. Google documents no way to reapply it to data already collected.
Everything not on the list goes through: scrapers driving a real browser, uptime monitors, QA scripts, load tests. GA4's internal and developer traffic filters only catch traffic you declared in advance.
A GA4 session is a group of events from one user_pseudo_id that share one ga_session_id, closed after 30 minutes of inactivity by default. The export stores events, so every bot signature is computed at that session grain. Unknown bots sit in those rows, mixed with humans, until a rule separates them.
Which four signatures reveal bots in the export?
Four signatures reveal automated traffic in the export: one event, a burst, a wrong country, and repeated purchases. Each is a column computed from documented export fields.
| Signature | Field in the export | Threshold used here | Human cause that looks the same |
|---|---|---|---|
| Single-event session | Events per user_pseudo_id + ga_session_id | Exactly 1 event | A tab left open that fires one event after the timeout |
| Burst from one identifier | Sessions per user_pseudo_id per event_date | 5 or more the same day | A shared office computer, a kiosk, a tester |
| Out-of-market country | geo.country, derived from the IP address | A country with no purchase in the period | A traveler, a VPN user, an expatriate |
| Repeated purchases | purchase events per session | More than 1 | A tag fired twice, a customer placing two orders |
None of these signatures proves a bot on its own. Each has a human explanation, so the method scores sessions instead of judging them.
The thresholds are starting points, not standards. Five sessions a day suits a store; a news site needs a higher bar. On a real export, replace "no purchase in the period" with your list of delivery markets.
Engagement signals stay out of the score on purpose. On the same sample, the data trust guide's query found 17,899 of 118,380 sessions with zero engagement time. That share is too large to separate scripts from people who leave fast. It also found 7,180 sessions without a page_view and 1,866 without a session_start. Use them to investigate, not to score.
SQL: how do you flag suspect sessions?
One query rebuilds sessions, flags the four signatures, and sums them into a score from 0 to 4.
A suspect session is a GA4 session that matches at least one behavioral signature of automated traffic in the BigQuery export, flagged in a column with a suspicion score rather than deleted, so that every report can show its totals with and without suspect traffic from the same rows.
WITH sessions AS (
SELECT
user_pseudo_id,
(SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS session_id,
MIN(event_date) AS session_date,
ANY_VALUE(geo.country) AS country,
COUNT(*) AS events,
COUNTIF(event_name = 'purchase') AS purchases
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
GROUP BY user_pseudo_id, session_id
),
flagged AS (
SELECT
purchases,
events = 1 AS single_event,
COUNT(*) OVER (PARTITION BY user_pseudo_id, session_date) >= 5 AS burst,
-- out of market: a country with no purchase in the period
SUM(purchases) OVER (PARTITION BY country) = 0 AS out_of_market,
purchases > 1 AS repeated_purchase
FROM sessions
),
scored AS (
SELECT *, CAST(single_event AS INT64) + CAST(burst AS INT64)
+ CAST(out_of_market AS INT64) + CAST(repeated_purchase AS INT64) AS suspicion_score
FROM flagged
)
SELECT signal, COUNTIF(hit) AS sessions, SUM(IF(hit, purchases, 0)) AS purchase_events
FROM scored, UNNEST([
STRUCT('1. all sessions' AS signal, TRUE AS hit),
('2. single event', single_event),
('3. burst', burst),
('4. out of market', out_of_market),
('5. repeated purchase', repeated_purchase),
('6. any traffic signal (2, 3, 4)', single_event OR burst OR out_of_market),
('7. score >= 1', suspicion_score >= 1),
('8. score >= 2', suspicion_score >= 2)])
GROUP BY signal
ORDER BY signal
| Signal | Sessions, January 2021 | purchase events |
|---|---|---|
| All sessions | 118,380 | 1,204 |
| Single event | 324 | 0 |
| Burst (5+ sessions, same identifier, same day) | 618 | 14 |
| Out-of-market country | 1,598 | 0 |
| Repeated purchases | 49 | 138 |
| Any traffic signature (single event, burst, or country) | 2,525 | 14 |
| Suspicion score of 1 or more | 2,573 | 145 |
| Suspicion score of 2 or more | 16 | 7 |
Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).
The three traffic signatures flag 2,525 sessions, 2.1% of the month (rounded to one decimal). Only 16 sessions combine two signatures. Out-of-market sessions hold no purchase by construction, since the rule uses purchases to define the market. The sample is obfuscated and from 2021, so these shares illustrate the method, not a benchmark.
ChatGPT, Googlebot, and other crawlers: what reaches GA4?
A crawler reaches GA4 only if it runs your JavaScript tag. Many crawlers fetch HTML and leave, so GA4 never hears of them. Your server logs see them; your export does not, and should not.
Some crawlers do run JavaScript: Google documents that Googlebot renders pages in a headless Chromium. Whether such hits survive depends on the known-bot list, which you cannot inspect.
OpenAI documents several agents with separate roles. GPTBot collects content for training. OAI-SearchBot surfaces sites in ChatGPT search. ChatGPT-User fetches a page when a user asks a question. OpenAI's page says nothing about JavaScript execution, so the export is where you check. Agents that run your tag show the same signatures: single events, bursts, odd countries.
The person who clicks a link inside an assistant's answer is a different case. That visitor is human, arrives as a referral, and belongs in your acquisition reports. Measuring that channel is a separate method, covered in Measuring traffic from ChatGPT, Perplexity, and Copilot in GA4.
Exclude or flag: why should you keep the raw data?
Flag suspect sessions and keep every row: a deleted row cannot be rechecked, a flag can. Thresholds change as your traffic changes. A rule applied to the full history needs that history intact.
| Approach | What you keep | What you lose |
|---|---|---|
| Delete suspect rows | A smaller table | Any way to test a new threshold on the past |
| Exclude in each report's query | The raw rows | One definition: each analyst writes a different filter |
| Flag once in a dated view, filter in reports | The raw rows and one shared rule | Nothing; reports show totals with and without |
The flag sits in one SQL view, versioned and dated. Reports read the view and choose: "all sessions" or "sessions without suspect traffic". When the rule changes, the whole history is recomputed with the new version. A rule that differs per analyst gives three bot shares for one site.
Flags also protect reconciliation. A purchase event without a back-office order can be a test, a duplicate, or a bot. Deleting it hides one cause of the gap explained in Why GA4 and your back office never report the same revenue.
Why do bots move sessions more than sales?
Bots move sessions more than sales. On the sample, traffic signatures flag 2.1% of sessions but 1.2% of purchase events. Excluding them barely changes purchase counts; it mostly lowers the session count and raises the conversion rate.
Repeated purchases are the exception, and they are rarely bots. This query opens those 49 sessions.
WITH purchases AS (
SELECT
CONCAT(user_pseudo_id, '-', CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING)) AS session_key,
NULLIF(ecommerce.transaction_id, '(not set)') AS transaction_id
FROM `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20210101' AND '20210131'
AND event_name = 'purchase'
),
repeated AS (
SELECT session_key
FROM purchases
GROUP BY session_key
HAVING COUNT(*) > 1
)
SELECT
COUNT(DISTINCT session_key) AS sessions,
COUNT(*) AS purchase_events,
COUNTIF(transaction_id IS NULL) AS events_without_id,
COUNT(DISTINCT transaction_id) AS distinct_transaction_ids
FROM purchases
JOIN repeated USING (session_key)
| Sessions with repeated purchases | purchase events | Events without a transaction ID | Distinct transaction IDs |
|---|---|---|---|
| 49 | 138 | 42 | 87 |
Computed on 2026-10-15 on the public sample bigquery-public-data.ga4_obfuscated_sample_ecommerce (Google Merchandise Store, 2020-11-01 to 2021-01-31, obfuscated data).
The 96 events with an ID carry 87 distinct transactions, so most look like separate orders. Fixing sales is a transaction-ID job, not a bot job. The month's 1,204 purchase events hold 894 distinct valid IDs, as the guide measured. A tag that fires twice is a tagging defect, the subject of Tracking health: the GA4 tagging flaw that skews everything.
A data trust score is a per-site indicator that combines, on one scale, the share of duplicated transactions, the share of key parameters at (not set), the delay of the export behind the calendar day, and the share of suspect sessions, so that sites or periods can be compared on data quality before they are compared on performance.
The suspect-session share is one of its components, worth tracking every day.
FAQ
Can I remove bot traffic from past GA4 data?
Not in the GA4 interface: Google documents no way to reapply the known-bot filter to past data. In BigQuery, you can. A suspect-session flag is a query on your existing tables. A new rule therefore covers your whole history the day you write it. Keep the rule versioned, so past reports stay explainable.
Does GA4 tell you how much bot traffic it excluded?
No, GA4 does not show how much known bot traffic it excluded, as Google states. You cannot turn the exclusion off either. The filtered hits never reach the BigQuery export. What you can measure is the suspect traffic that passed the filter, with signatures and a score.
Does blocking crawlers in robots.txt clean my GA4 data?
Only partly. Declared crawlers such as GPTBot and OAI-SearchBot follow robots.txt, according to OpenAI. OpenAI also notes that robots.txt rules may not apply to user-initiated ChatGPT-User visits. Scrapers usually ignore the file. Robots.txt controls crawling, not measurement, so the export still needs its own rule.
Do bots inflate or deflate my GA4 conversion rate?
Bots usually deflate a session conversion rate. They add sessions to the denominator and almost never add purchases. On the public sample, traffic signatures flag 2.1% of sessions but 1.2% of purchase events. Excluding them raises the rate slightly, so report which definition a figure uses.
Suspect traffic is one of five reasons GA4 and your orders differ; the other four are in Trusting your GA4 numbers: consent, reconciliation, bots, and tagging. Want these signatures and the score run on your own export? Book a diagnostic.
Sources
- Known bot-traffic exclusion (opens in a new tab) - Google, consulted 2026-10-15
- BigQuery Export schema (opens in a new tab) - Google, consulted 2026-10-15
- About Analytics sessions (opens in a new tab) - Google, consulted 2026-10-15
- Understand JavaScript SEO basics (opens in a new tab) - Google Search Central, consulted 2026-10-15
- Overview of OpenAI crawlers (opens in a new tab) - OpenAI, consulted 2026-10-15