Skip to content
Start free trial
BlogTraffic and attribution

How to filter bot traffic and referrer spam out of your analytics

What bots and fake referrers do to your numbers, why they need filtering before anything is counted, and how to recognise the automated traffic that still gets through.

Say you check your analytics on a Monday morning and Saturday’s traffic has tripled. The extra visits all came from one referrer you’ve never heard of, every one of them bounced, and none of them converted.

What you’re looking at is automated traffic. It has just lowered your conversion rate and padded your sources report with a site that never sent you a person.

This post explains how to filter bot traffic and referrer spam in analytics, why the filtering has to happen before anything is counted, and how to spot the automated visits that get past any filter.

Key takeaways

  • Bots inflate visits and Direct, drag down conversion rates, and create spikes that look like wins.
  • Referrer spam is fake traffic that puts a domain in your referrer report, hoping you’ll visit it.
  • Filtering at ingest keeps bots out of every total, while filtering afterwards leaves them in anything already calculated.
  • User-agent checks catch bots that announce themselves, but a bot posing as a normal browser needs a human eye.
  • FunnelSights counts the bots it identifies on a separate Bots report and drops referrer spam outright.

What is bot traffic?

Bot traffic is any request to your site made by software rather than a person. Some of it is welcome and some of it isn’t, but all of it comes from one of these groups.

  • Search engine crawlers, such as Googlebot and Bingbot, which index your pages.
  • AI crawlers, such as GPTBot, ClaudeBot and PerplexityBot, which collect pages for training or search, and fetchers like ChatGPT-User that read a page to answer someone’s question.
  • SEO tools, such as AhrefsBot and SemrushBot, which crawl sites to build their link and keyword data.
  • Link previewers, which fetch your page when someone pastes a link into Slack, WhatsApp or LinkedIn.
  • Uptime monitors and performance tools, which load a page on a schedule.
  • Scripts and scrapers, from headless browsers to simple HTTP libraries, run by anyone for any reason.

None of these are people, so none of them belong in your visitor numbers, even the ones you’re glad to have.

What is referrer spam?

Referrer spam is fake traffic that carries a made-up referrer. The aim is to get the spammer’s domain into your referrer report, so that you, being curious, go and visit it.

Older analytics setups also suffered from “ghost spam”, where hits were sent straight to the analytics service without anyone loading the page. Either way, you end up with a source row that never sent you a real visitor.

How do bots distort your reports?

Bots rarely look dramatic in a total. They do their damage in the details.

  • Direct grows, because most bots send no referrer.
  • Bounce rate rises, because a bot typically loads one page and leaves.
  • Conversion rate falls, because bots add visits but never sign up or buy.
  • Odd sources and landing pages appear, and send you looking for a campaign that doesn’t exist.

On a small site, a single scraper can move these numbers more than a month of real marketing. It also muddies your attribution, which the traffic source attribution guide depends on being clean.

Why filter at ingest instead of afterwards?

Many analytics setups record everything and let you filter bots out of reports later. The trouble is that totals, bounce rates and conversion rates are often calculated before your filter runs, so the bots are already baked in.

Filtering at ingest means deciding at the door. A request that looks automated never becomes a visit, so it can’t appear in any total, any rate or any source row.

What happens to a request at ingest
  1. User agentA request with an empty user agent is treated as a bot straight away.
  2. Named botsThe user agent is checked against a catalogue of named bots: search engines, AI crawlers, SEO tools, link previewers, monitors, headless browsers and HTTP libraries.
  3. Crawler databaseAnything not named there is checked against the uap-core database of known crawlers.
  4. Spam listA request that passed, but whose referrer is on the Matomo referrer-spam list or a subdomain of a listed domain, is dropped.
  5. CountedOnly what passes all four checks becomes a visit in your reports.

This is the order FunnelSights uses. Identified bots are counted on the Bots report instead of being thrown away.

How FunnelSights filters bots and spam

Every check in the figure runs when the event arrives, before any visit is created. A bot’s pageview is diverted into a separate count, by bot name, and never touches the tables your other reports read.

That separate count is the Bots report. It shows bot visits beside human visits and the bot share of the total, each bot by name with who runs it and what it’s for, the categories over time (AI bots, search engines, scrapers and scripts, and everything else), and the pages bots load most.

Many crawlers never run JavaScript, so they never trigger a script-based tracker. FunnelSights catches some of them anyway: the install snippet names your domain, so a known bot that downloads the script is recorded as a sighting. The report is still a floor rather than a full count, because a crawler that neither runs nor downloads the script leaves no trace.

Referrer spam is simpler. It’s dropped outright and not counted anywhere, because there’s nothing useful to learn from it.

Two more defences sit at the same door. Bots get their own rate limit, so a crawler storm can’t use up the capacity your real visitors’ events need. And events naming a domain that no workspace has registered are dropped silently, so a copied snippet on someone else’s site can’t create data.

What the Bots report is useful for

Keeping bots out of your traffic is the main job, but the count itself answers a few questions you may already have.

  • Which AI crawlers read your site, and how often. That’s useful context if you’re deciding what to allow in robots.txt.
  • How much of your site’s load comes from SEO tools and scrapers rather than people, which matters on cheap hosting.
  • Whether an uptime monitor or performance tool is hitting the same page every few minutes, which is easy to forget once it’s set up.
  • Which pages bots load most. A crawler hammering one old URL is often a sign of a broken link or redirect somewhere.

None of those numbers affect your human reports, so you can read them out of curiosity and ignore them the rest of the time.

Which bots get through user-agent filters?

User-agent checks catch bots that say what they are, and most legitimate ones do. A bot written to look like a person, with a normal browser user agent and JavaScript switched on, passes the same checks a person passes.

No user-agent filter catches those, so the last line of defence is reading your reports with some suspicion. Taken together, these signs usually point to automation.

Signs a traffic spike is automated
Usually real peopleWorth a closer look
Bounce rateMixed, varying by pageClose to 100% across the spike
Visit lengthSpread outZero, or identical for most visits
SourceA mix you recogniseOne unfamiliar referrer, or all Direct
Landing pagesYour popular pagesOne page, or pages nobody links to
Location and deviceYour usual spreadOne city, or one old browser version
ConversionsRoughly in line with trafficNone at all

No single sign proves anything. Three or four together are a strong hint.

If you find a pattern like this, open the Bots report for the same days, then check the landing pages and locations behind the spike. Treat that period with care in any comparison, and note it so next month’s report doesn’t present it as growth.

How do other analytics tools handle bots?

Google Analytics 4 excludes traffic from known bots and spiders automatically, using Google’s own research and the IAB’s international spiders and bots list. You can’t turn that off, and you can’t see how much it removed.

GA4 has no built-in referrer-spam list, so spam that gets through needs a filter or segment of your own. If your GA4 and FunnelSights numbers disagree, bot handling is one of the reasons covered in why analytics numbers don’t match GA4.

Whatever tool you use, the principle is the same: the earlier bots are removed, the fewer of your numbers they can touch. For how bots and stripped links together inflate your unlabelled traffic, read what direct traffic means.

Frequently asked questions

How do I know if my site has bot traffic?

Every public site has some. Look for spikes with near-total bounce rates, zero visit length, one unfamiliar source or one landing page, and no conversions. In FunnelSights, the Bots report shows the identified bots and their share of visits directly.

Should I block AI crawlers?

That is a business decision about whether you want your content used for training or cited in answers, and you make it in robots.txt or at your server. Blocking crawlers changes your analytics very little, because a good analytics tool already keeps them out of your visitor numbers.

Does referrer spam harm my website?

It doesn’t usually touch the site itself, but it pollutes your referrer report and can tempt you to visit dubious domains. Dropping it at ingest keeps it out of your reports, and the safest response to an unknown referrer is not to visit it.

Does GA4 filter bot traffic automatically?

Yes. GA4 excludes known bots and spiders automatically and you can’t switch it off. It doesn’t report how much it removed, and it has no built-in referrer-spam list.

Why don’t bots show up in my FunnelSights visitor numbers?

Because identified bots are diverted at ingest, before any visit is created. They are counted separately on the Bots report, so you can see them without them affecting your traffic, sources or conversion rates.

More in this series

This post is part of Website traffic source attribution: a practical guide, our guide to traffic and attribution.