Bot traffic filtering for links: what gets flagged and what slips through

Bot traffic filtering for links runs 3 tests: known crawlers, empty user agents and prefetch headers. See what a flagged click changes and what slips through.

Muzahid Maruf — Founder of TrackRev.io

Muzahid MarufUpdated

Link tracking · 8 min read
On this page
  1. 01Where do non-human clicks come from?
  2. 02How does TrackRev filter bot traffic on links?
  3. 03What can a user-agent list not see?
  4. 04How do you spot the bot clicks that got through?
  5. 05Why is revenue the second filter?
  6. 06When is a header and list filter not enough?

Explore with AI

Opens this article inside the chosen assistant with a ready-made prompt.

Bot traffic filtering for links is the 3-test check that decides, request by request, whether a hit on a short link counts as a click.

We built TrackRev to flag a request when its user agent matches the isbot 5.2.1 pattern list, when the user agent is empty, or when a purpose header marks it as a prefetch.

A flagged request still gets its 302 redirect, is stored with is_bot true, and stays out of every report.

That removes Googlebot/2.1, the Slack and Facebook preview fetchers, curl/8.4.0 and python-requests/2.31.0 scripts, and Chrome's speculative loads. A scanner with an ordinary Chrome 120 user agent passes, and finding those takes a look at your own click data.

Key takeaways

  • TrackRev flags a click as a bot when the user agent matches isbot 5.2.1, is empty, or carries a prefetch header, and still sends the 302 redirect.
  • Flagged clicks leave dashboard totals, partner counts and the 30-day attribution window, and bots=include on the clicks API brings them back.
  • An ordinary Chrome 120 string passes the filter, so look for clicks that bunch within a second and never produce a pageview.
  • Credited revenue ignores phantom clicks, but conversion rates carry them, so a $0.25 per-click payout pays for every fake one.

Where do non-human clicks come from?

Non-human clicks are requests to a link made by software instead of a person.

The Media Rating Council's invalid traffic addendum (June 2020 update) calls what list-based filtering finds general invalid traffic: bots and spiders, non-browser user agents, pre-fetch and pre-render traffic, and known data-center traffic.

Sophisticated invalid traffic takes advanced analytics and human review. The standard covers ad impressions, and the split carries over to links. The table below lists 7 sources.

Slack's robots page says Slackbot-LinkExpanding 1.0 fetches links posted into channels with HTTP Range headers and caches responses across the service for around 30 minutes. Meta documents facebookexternalhit/1.1 as the crawler behind previews on Facebook, Instagram and Messenger.

Mailchimp's bot activity page names anti-spam filters at email providers, Apple's Mail Privacy Protection and link preview generators as tools that often click links or open emails before the recipient does.

Its bot-filtered email click data starts on August 10, 2025, and it hides flagged activity without deleting it, the design TrackRev uses. The newsletter guide and the Slack and Discord guide go deeper on those channels.

SourceIdentified byCaught by a user-agent list
Search crawlersGooglebot/2.1 in the user agent. Google publishes reverse DNS names and IP ranges to check the claimYes
Chat and social preview fetchersSlackbot-LinkExpanding 1.0 from Slack and facebookexternalhit/1.1 from MetaYes
Browser prefetch and prerenderA Sec-Purpose header set to prefetch or prefetch;prerender in ChromeNo, a header test catches it
Scripts and HTTP librariescurl/8.4.0 and python-requests/2.31.0 default stringsYes
Headless browsersHeadlessChrome/120.0.0.0 in the string unless the script overrides itYes, until the string is changed
Email security scannersMicrosoft Defender for Office 365 Safe Links scans URLs in mail flow and verifies them again at click timeOnly when the scanner announces itself
Click farms and residential proxiesOrdinary browser strings from consumer networksNo

TrackRev's filter is a 3-part check run on every request to a short link, and any single part flags the request.

  • Step 1: a missing or blank user-agent header is flagged.
  • Step 2: the user agent is checked against isbot 5.2.1, the version we use because TrackRev's lockfile resolves it. It is an open-source list of 209 patterns built from public crawler lists such as monperrus/crawler-user-agents and user-agents.net. It matches names like Googlebot and HeadlessChrome, any string where bot ends a word, and any string containing http, which is how Googlebot, Slackbot-LinkExpanding and facebookexternalhit point to their documentation.
  • Step 3: the headers x-purpose, purpose and sec-purpose are read, and a value containing prefetch flags the request. Chrome sends Sec-Purpose: prefetch for a Speculation Rules prefetch and prefetch;prerender for a prerender, and MDN says a server can treat such requests differently when counting visits.
User agent sentVerdict
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)Bot
Slackbot-LinkExpanding 1.0 (+https://api.slack.com/robots)Bot
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)Bot
curl/8.4.0Bot
python-requests/2.31.0Bot
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/120.0.0.0 Safari/537.36Bot
Empty headerBot (TrackRev's own test; isbot alone returns false)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36Counted as a person
Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1Counted as a person

Results of TrackRev's check, isbot 5.2.1 plus the empty-header test.

What does a flagged request change?

Part of TrackRevWhat happens to a flagged request
Redirect at /r/slug302 to the destination, because a person can sit behind a preview or a scan; click stored with is_bot true, no rate limit and no de-duplication
Dashboard, channel and per-link totalsCounted for unflagged clicks only
Attribution engineCredits unflagged clicks inside the attribution window, 30 days by default
Partner click countsUnflagged clicks only
click.created webhookNot sent
Retargeting pixel pageSkipped, so a plain 302
Pixel endpoints /api/collect and /api/identify200 with skipped set to bot, nothing written
Pixel endpoints, unflagged requests429 above 300 requests a minute per IP on /api/collect and 30 on /api/identify, 413 above a 16 KB body

Behavior as of October 2026.

Why does TrackRev keep flagged clicks?

Keeping flagged clicks means storing the rows with is_bot true while leaving them out of every report. Google Analytics 4 excludes known bots automatically, using Google research and the International Spiders and Bots List kept by the Interactive Advertising Bureau.

The exclusion cannot be switched off, and Google does not report how much it removed. TrackRev keeps the rows.

The clicks API leaves them out unless you pass bots=include, and the CLI has the same switch, so you can measure your own bot share.

The API needs a paid plan and a secret key, and --all stops after 200 pages of up to 500 clicks, so on a large workspace add --link with one link ID.

Flagged versus counted requests across the click stream
trackrev clicks --bots --all --json \
  | jq '.clicks | group_by(.is_bot) | map({is_bot: .[0].is_bot, requests: length})'

What can a user-agent list not see?

A user-agent list is a set of patterns matched against the User-Agent header, so a list catches only bots that announce themselves.

The isbot 5.2.1 README says the package identifies good bots that announce themselves and does not try to recognize malicious bots or programs posing as real users.

We built TrackRev to store each click's IP address and user agent but to set the flag from the 3 tests alone.

The filter checks no IP ranges, runs no timing or rate analysis and does not de-duplicate repeat requests, so a script that requests a link 10,000 times with a Chrome 120 string adds 10,000 counted clicks.

For scale, Imperva's 2025 Bad Bot Report put automated traffic at 51% of all web traffic and bad bots at 37%, and its 2026 edition says bots now make up the majority.

Those figures cover web traffic as a whole and say nothing about your links, so measure your flagged share with the command above.

How do you spot the bot clicks that got through?

A bot click that got through is a request with an ordinary browser string such as Chrome 120, so the click needs a behavioral test.

The clicks API returns 6 fields per click: a timestamp, city, device, browser, referrer and visitor ID. Six fields are enough to catch bursts within 1 second of a send and every link in a message clicked from 1 city.

The visitor journey, in the dashboard or through trackrev visitors journey, lists pixel events after a click, so a click with 0 pageviews behind it stands out.

Click idTime (UTC)LinkCityBrowser and OSPixel pageview
9041708:00:01/r/launch-aAshburnChrome on Windowsnone
9041808:00:01/r/launch-bAshburnChrome on Windowsnone
9041908:00:02/r/launch-cAshburnChrome on Windowsnone
9042008:00:02/r/launch-dAshburnChrome on Windowsnone
9043108:07:41/r/launch-bAustinSafari on iOS08:07:43
9046608:19:15/r/launch-aBerlinChrome on macOS08:19:16
9058909:02:30/r/launch-cTorontoFirefox on Windows09:02:33

Invented log for 4 links sent at 08:00:00, every row with is_bot false. The first 4 rows look like software: all 4 links in 2 seconds, one city, no pageview.

How much do bots distort a conversion rate?

A conversion rate is signups divided by counted clicks, so every counted bot click lowers the rate.

Worked example with made-up numbers

A link logs 2,000 requests in a week and the filter flags 300, so 1,700 clicks are counted. If 340 of those are gateway scans with browser strings, 1,360 are people. With 34 signups, the dashboard shows 34 / 1,700 = 2.0%, the true rate is 34 / 1,360 = 2.5%, and a counter with no filter would show 34 / 2,000 = 1.7%. Cost per click and revenue per click shift the same way.

Why is revenue the second filter?

Revenue is the second filter because only a paid order earns credit. When we credit a paid order, the attribution engine takes that visitor's unflagged clicks inside the 30-day default window under last-touch, first-touch or linear.

A scanner's click carries its own visitor ID, so it cannot take credit for someone else's sale, and credited revenue per channel stays clean even when click counts are not. Revenue attribution shows the join.

Click-based payouts are where phantom clicks cost cash. At $0.25 a click, 10,000 scripted requests earn $2,500 for someone who never sold anything.

TrackRev's affiliate commissions are calculated on payments synced from 6 processors (Stripe, Paddle Billing, Polar, Lemon Squeezy, Creem and Dodo Payments), a refunded or disputed charge takes its commission back out, and a program's hold period (0 to 180 days, 0 by default) delays payout past the refund window.

The affiliate fraud guide covers the attacks that do complete a purchase.

When is a header and list filter not enough?

A header and list filter is not enough for paid ads or for attacks on a site. For paid ads, the platform's own filter is the record.

Google Ads says it removes invalid clicks from metrics and billing and credits the next invoice when it finds them later, so the ad platform and a link tool report different click totals.

For attacks on a site, put a bot-management product such as Imperva's Advanced Bot Protection in front of it.

TrackRev is SaaS affiliate software for indie hackers and small teams, with link tracking built in.

That link tracking redirect sets the flag, first-party tracking covers the server-side capture behind it, and the server-side versus client-side guide explains why a check on the server survives blockers.

Flagging runs on all 3 plans, and pricing lists the rest.

PlanPriceLinks and tracked eventsClicks API and revenue figuresCommission tracked
Free$050 links, 1,000 events a monthNoNone
Indie$29 a monthUnlimitedYesNo cap
Growth$299 a yearUnlimitedYesNo cap

Plan limits as of October 2026. Bot flagging runs on all 3.

Found this useful? Share it.

PostLinkedIn

Frequently asked questions

Muzahid Maruf — Founder of TrackRev.io

Written by

Muzahid Maruf

Founder, TrackRev.io & Contant.io

Muzahid Maruf founded TrackRev.io, SaaS affiliate software with no limit on tracked revenue, and Contant.io. He writes about affiliate programs.

Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth

Run your affiliate program without a revenue cap.

Affiliate software for indie hackers and small SaaS teams: $29 a month flat, 0% fees, link tracking and revenue attribution built in. Free to start, no card.