# How we know AI agent traffic from real users

> Your analytics dashboard says 50,000 page views yesterday. Cool. How many were actual humans, and how many were a bot farm in Virginia, or an AI crawler doing a vibe check on…

- Author: Mert Enercan (https://merto.dev)
- Published: 2026-06-22
- Language: en
- Tags: analytics, hardal, ai
- URL: https://merto.dev/blog/how-we-know-ai-agent-traffic-from-real-users/
- Originally published: https://medium.com/usehardal/how-we-know-ai-agent-traffic-from-real-users-7061a6c097ce

---

_Your analytics dashboard says 50,000 page views yesterday. Cool. How many were actual humans, and how many were a bot farm in Virginia, or an AI crawler doing a vibe check on your_ _/pricing page?_

![](https://cdn-images-1.medium.com/max/1024/0*VbBKiCKnkApviN55)

### The problem nobody talks about at standup

Traffic spikes feel great until you realize half the “visitors” never had eyeballs on your site. Bots, monitors, scrapers, and now AI agents crawl public pages constantly — often from cloud subnets that look nothing like a person on a couch with an iPhone.

The hard question isn’t “did someone hit this URL?” It’s:

-   Was it a **real user**?
-   Was it **some bot**?
-   Was it an **AI agent** specifically?

We built a pipeline to answer that. Not with vibes — with a funnel. Real users get silently ignored. Bots get classified. AI bots get labeled. Everything lands in analytics where you can actually chart it.

**Want this on your site without wiring it yourself?** [Join the Hardal AI Visibility beta waitlist](https://usehardal.com/waitlist?utm_source=linkedin&utm_medium=referral&utm_campaign=june_ai_visibility&utm_content=merto) — first-party, server-side visibility into which AI agents are hitting your pages.

### The front door: POST /agent-events

This isn’t a firehose for every page view. It’s a narrow pipe: your edge layer or SDK sends a JSON payload when it spots automated traffic worth logging.

**Headers**

-   tenant-id — which customer’s data warehouse this belongs to

**Body**

FieldWhat it ispathThe URL that got hitipClient IPuserAgentThe classic Mozilla/5.0 (compatible; SomeBot/1.0) stringeventTimeWhen it happenedsourceIdWhich tracker or source fired the event

Everything that follows runs through a stack of middleware before the handler even touches the payload.

### Gate 1: Are you even a bot?

First filter: **automated traffic detection**.

Normal Chrome, Safari, Firefox user agents? **Rejected.** Not with a loud error — with a silent **204 No Content**. Gone. Poof.

Real users don’t belong in this pipeline. We don’t waste cycles logging them or yelling about it.

Only traffic that already smells automated gets through.

> _If your grandma is browsing on Safari, she never touches our bot database. That’s the point._

### Gate 2: Is that IP actually bot infrastructure?

Second filter: **IP allowlist**.

The ip in the body gets checked against a curated allowlist of known web crawler and bot datacenter IPs — maintained and refreshed on our side, with caching so lookups stay fast.

Random home broadband claiming to be Googlebot? **Also ghosted** — 204 again.

This keeps the dataset honest. We’re not trying to log every bot _claim_ on the internet. We want traffic that plausibly came from bot-shaped infrastructure.

### Gate 3: OK, you’re a bot on a bot IP — but which bot?

Now the handler does two things:

1.  **Classify** the user agent string
2.  **Store** the result in our analytics store

Every request that makes it here is already labeled **bot**. That’s the baseline — you passed the gates, you’re automated.

Then we layer on more signal.

### Crawler vibes

If the UA string contains words like crawl, spider, slurp, or indexer, we add a **crawler** label.

Classic SEO bot energy. Helpful for segmentation even before we name the specific agent.

### Signature matching — the heavy lifting

We don’t guess from one regex. We run the user agent through **multiple signature catalogs** in parallel — substring matches, regex patterns, and curated bot hint lists we keep up to date.

Each catalog can return a possible match with a confidence score. We pick the **best match** — longest and most specific wins when signatures overlap.

### The AI distinction

Here’s where “bot” becomes “AI bot.”

Certain categories from the signature catalogs get flagged as AI-related:

-   **AI Agent**
-   **AI Assistant**
-   **AI Data Scraper**
-   **AI Search Crawler**

When the best match lands in one of those buckets, we add an **ai** label and store metadata:

-   **platform** — who built it
-   **agent** — the specific bot name
-   **aiAgentCategory** — what kind of AI traffic it is

So you’re not just counting “bot hits.” You’re counting **“PerplexityBot scraped** **/blog at 3am”** vs **“Googlebot indexed** **/blog at 3am”** vs **“some random uptime monitor pinged** **/health.”**

That’s the difference between a vanity metric and something you can actually explain in a board meeting.

### What gets stored

Each accepted event becomes a row in our analytics pipeline:

-   Page path and timestamp
-   is\_bot / is\_ai flags
-   Agent name, platform, and category
-   Tenant and source ID

That’s what you chart: AI crawler traffic over time, which pages AI agents love, whether your /docs section is getting scraped more than your homepage — that kind of thing.

> **_See it in a dashboard, not a SQL console._** _We’re opening early access to_ **_AI Visibility_** _on Hardal — the same first-party, server-side signal, packaged for teams who’d rather know_ which _AI agents visited_ _/pricing than guess from a traffic spike.  
> _[**_Join the waitlist →_**](https://usehardal.com/waitlist?utm_source=blog_merto_1&utm_medium=referral&utm_campaign=june_ai_visibility&utm_content=merto)

### The whole flow

```ts
Request comes in
       │
       ▼
  tenant-id valid? ──no──► error
       │ yes
       ▼
  userAgent a bot? ──no──► 204 (real user, ignored)
       │ yes
       ▼
  IP on bot allowlist? ──no──► 204 (sketchy bot claim, ignored)
       │ yes
       ▼
  Classify UA across signature catalogs
       │
       ▼
  Tag: bot + maybe crawler + maybe AI
       │
       ▼
  Write to analytics → return labels in JSON
```

Three gates. Multiple signature catalogs. One analytics table. Zero confused grandmas in the bot report.

### TL;DR

**Real users** → filtered out silently at the bot gate. They never pollute the dataset.

**Fake bots / random IPs** → filtered at the IP gate. Also silent.

**Actual bots on known infra** → classified, named, and tagged — including whether they’re AI-related.

We’re not trying to catch every bot on earth. We’re building a **clean signal layer** for automated traffic that matters — with enough detail to tell your CEO that yes, traffic is up, but 40% of it is AI crawlers, not customers.

### Get early access

[**Hardal AI Visibility**](https://usehardal.com/waitlist?utm_source=blog_merto_1&utm_medium=referral&utm_campaign=june_ai_visibility&utm_content=merto) is in beta. See which AI agents visit your site using first-party, server-side data — no spam, just early-access updates.

[**Join the waitlist**](https://usehardal.com/waitlist?utm_source=blog_merto_1&utm_medium=referral&utm_campaign=june_ai_visibility&utm_content=merto)

_This pipeline powers agent detection behind the scenes at_ [_Hardal_](https://usehardal.com/?utm_source=merto.dev&utm_medium=referral&utm_content=blog_how-we-know-ai-agent-traffic-from-real-users)_._

* * *

[How we know AI agent traffic from real users](https://medium.com/usehardal/how-we-know-ai-agent-traffic-from-real-users-7061a6c097ce) was originally published in [Hardal](https://medium.com/usehardal) on Medium, where people are continuing the conversation by highlighting and responding to this story.
