Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Bot traffic inflating sessions in GA4: how to find and fix it

TRK-345Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

Bot traffic is any visit made by software instead of a person. Some bots are harmless, such as search engine crawlers. Others are scrapers, vulnerability scanners, fake-click scripts or spammers that load your pages and run your analytics code. When your tracking runs for these visits, they are counted as sessions (a group of page views and events from one visit).

Why it costs you leads or sales

Fake sessions do not buy anything, so they push your conversion rate down. If a landing page gets real visitors plus a wave of bots, the page can look weak when it is fine. You may rewrite a good page, pause a good campaign or move budget to the wrong channel.

It also hurts ad platforms. If bots land in remarketing audiences or trigger events you import as conversions, the platform learns from junk. Reports for stakeholders and clients become harder to defend.

How bots drag down the conversion rateExample numbers
How bots drag down the conversion rate (example)Real sessions only: 2 % conversion rate; With bot sessions: 1 % conversion rate01221Real sessions onlyWith bot sessions% conversion rate

Example: the same 100 real leads from 5,000 real sessions is a 2% rate. Add 5,000 bot sessions and it reads as 1%, though nothing changed for real visitors.

How to check if your site has it

Bot traffic rarely looks like one clear error. You find it by spotting patterns that real people would not produce. Open GA4 and compare a normal week with a suspicious one.

Signs of bot or spam sessions
  • A sudden spike in sessions with no campaign, email or press to explain it
  • Most of the spike comes from one country, city or service provider you do not sell to
  • Engagement rate near 0% and average engagement time of 0 to 1 seconds
  • One landing page, often the home page or a odd URL, takes almost all of the spike
  • Traffic labelled Direct or Unassigned jumps while other channels stay flat
  • Unusual screen resolutions, outdated browser versions or one device model repeated many times
  • Sessions arrive in regular bursts at the same minute every hour
  • Server logs show many requests from one IP range or a single user agent
Investigate in GA4
  1. Find the spike

    Go to Reports > Acquisition > Traffic acquisition. Set the date range to the spike and look at sessions by Session default channel group.

  2. Break it down

    Use the plus button to add a secondary dimension such as Country, City, Device category, Browser or Landing page. Look for one value that holds most of the spike.

  3. Check engagement

    Compare engagement rate and average engagement time for that slice against the rest of the site. Bots usually show almost none.

  4. Confirm in your server logs

    Ask your host or check your CDN dashboard for requests by IP, user agent and country in the same time window. Analytics alone cannot prove a visit was a bot.

How to fix it

There are three layers: stop bots reaching your site, keep what gets through out of your reports, and keep it away from ad platforms. Start at the edge because it fixes the cause rather than hiding the symptom.

Reduce and filter bot traffic
  1. Block or challenge at the edge

    Use your CDN or web application firewall (for example the bot and rate limiting rules in your CDN or host). Add rules for the offending IP ranges, countries you do not serve, or suspicious user agents. Use the platform's own bot protection features as intended.

  2. Add a rate limit

    Limit how many requests one IP can make per minute so scripts that hammer your pages are slowed or blocked.

  3. Create a report segment or comparison

    In GA4 Explore, or with a Comparison in standard reports, exclude the bad slice (for example a country, city or hostname) so you can read clean numbers. This hides data in your view only. It does not delete it.

  4. Use a data filter for known patterns

    In GA4 go to Admin > Data collection and modification > Data filters. Data filters work on specific built-in parameters, such as internal traffic or developer traffic, so they suit traffic you can identify by IP or debug mode. Test a filter in Testing state before activating it, because active filtering is permanent.

  5. Keep bots out of audiences and conversions

    Do not import conversions or build remarketing lists from events that bots can trigger on their own. Require a meaningful action, such as a real form submission, before the event counts.

  6. Restrict valid hostnames

    If fake hits come from other domains using your measurement ID, build a report filter on Hostname so only your real domains are included.

Where to apply the edge protection
  1. Use a firewall plugin or your CDN

    Security plugins with a web application firewall, or a CDN in front of the site, let you block IPs, countries and user agents and rate limit login and form URLs. Check the exact menu names in your chosen plugin.

  2. Ask your host

    Many managed hosts can block abusive IPs at server level. Send them the IPs or ranges from your logs.

Example: rate limit requests per IP in nginxnginx
# in the http block
limit_req_zone $binary_remote_addr zone=perip:10m rate=5r/s;

# in the server or location block
limit_req zone=perip burst=20 nodelay;

# deny one abusive range (replace with a range from your logs)
deny 203.0.113.0/24;
Reports before and after cleaning up

Before

  • Sessions spike from one unrelated country
  • Engagement time near zero on the home page
  • Conversion rate drops with no change to the site
  • Remarketing lists fill with fake visitors

After

  • Edge rules stop most automated requests
  • Reports exclude the remaining bad slice
  • Conversion rate reflects real visitors
  • Audiences and conversions need a real action

How to confirm it's fixed

Check the clean-up worked
  1. Compare the same period

    Look at sessions by country, landing page and channel for the days after your change. The spike should be gone or much smaller.

  2. Check engagement

    Average engagement time and engagement rate should move back toward your normal range.

  3. Check server logs

    Blocked requests should show up as denied or challenged in your CDN or firewall dashboard.

  4. Test with a real visit

    Open the site from a normal browser and confirm you are not blocked and your own visit appears in GA4 Realtime.

How to prevent it happening again

Keep traffic data clean
  • Review sessions by country, landing page and source every week
  • Keep rate limits and bot rules active at your CDN or firewall
  • Restrict your tracking to your own hostnames
  • Annotate known campaigns so real spikes are easy to tell from fake ones
  • Base conversions and audiences on real actions, not page views alone
  • Set a GA4 custom alert or a scheduled report for unusual traffic jumps

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard runs a robot visitor through your real customer journeys on a schedule and checks that forms, checkouts, tracking hits and lead delivery work. It does not analyse who is visiting your site or tell real visitors from bots in your analytics.

The kind of tool that fits is a bot management or web application firewall service (usually part of a CDN or host) together with the traffic and anomaly reports inside your analytics platform. Use those to block and filter fake sessions. FunnelGuard's test visits are labelled (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent), so you can exclude them from your own reports.

Questions people ask

Why is my GA4 traffic suddenly spiking?

A spike with no campaign behind it is often bots. Check Traffic acquisition and add a secondary dimension such as Country or Landing page. If one slice holds most of the spike and has near-zero engagement time, it is likely automated.

Does GA4 filter out bot traffic automatically?

GA4 excludes traffic from known bots and spiders using a list from Google and the IAB. This does not catch newer bots that behave like normal browsers, so some fake sessions still appear in reports.

How do I block bot traffic from my website?

Block it at the edge with your CDN, host or web application firewall. Use bot rules, rate limits and blocks for abusive IPs or ranges, then check logs to make sure real visitors are not affected.

How do I exclude bot traffic from Google Analytics 4?

Use a comparison or segment in reports to exclude the bad slice, such as a country, city or hostname. GA4 data filters work for specific cases like internal traffic and developer traffic. Test a filter before activating it because active filtering is permanent.

Why did my conversion rate drop but nothing changed on the site?

Bot sessions add visits that never convert, which lowers the rate. Compare engagement and traffic by source and country to see if the extra sessions are fake before changing your pages or ads.

Can bot traffic affect my Google Ads or Meta campaigns?

Yes, if bots enter remarketing audiences or trigger events you use as conversions. Base conversions on real actions such as a completed form, and check audience sizes for sudden unexplained growth.

Can FunnelGuard detect bot traffic on my site?

No. FunnelGuard tests your funnels with a robot visitor and checks forms, tracking hits and lead delivery. For bot traffic you need a bot management or firewall service and your analytics reports.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.