Skip to content

Classify OIR traffic: human, AI, crawlers, bots - #117

Merged
itsmeront merged 1 commit into
mainfrom
stats-traffic-classification
Sep 3, 2026
Merged

Classify OIR traffic: human, AI, crawlers, bots#117
itsmeront merged 1 commit into
mainfrom
stats-traffic-classification

Conversation

@itsmeront

Copy link
Copy Markdown
Owner

Updates generate_stats.py to properly classify and filter traffic on the stats page.

Changes

Path filtering: Switched from a blocklist to an allowlist of OIR paths. Non-OIR traffic (imeyouwe.com/kdht/uuid paths, attack probes like .env/wp-admin/.php) is now excluded entirely.

Traffic classification by user-agent into four categories:

  • Human visitors -- real browser traffic to OIR pages
  • AI crawlers -- ChatGPT, ClaudeBot, GPTBot, Google-Extended, PerplexityBot, Amazonbot, Meta AI, etc.
  • Search-engine crawlers -- Googlebot, Bingbot, AhrefsBot, SemrushBot, etc.
  • Bots -- scanners, automated scripts, empty user-agents, monitoring tools

Stats page now shows:

  1. Traffic Overview table with breakdown by visitor type and percentages
  2. AI Crawlers detail table showing which AI systems are reading OIR
  3. Human-only page views, daily averages, and most visited pages
  4. Daily traffic chart filtered to human visitors only
  5. Updated methodology section explaining each category

Before: 250k+ page views including all bot/scanner/cross-site traffic.
After: ~322 human views/day, with clear separation of AI (16%), crawler (13%), and bot (5%) traffic.

Tested against a 5,000-line sample from the Docker nginx container logs.

- Parse user-agent from nginx combined log format
- Allowlist OIR paths only (exclude imeyouwe, attack probes, other apps)
- Classify into: human visitors, AI crawlers, search-engine crawlers, bots
- Show AI crawler breakdown by system (ChatGPT, Claude, Gemini, etc.)
- Most Visited Pages now shows only human traffic to real OIR pages
- Daily chart shows human views only
- Updated methodology section explaining each category

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added area/infrastructure Changes to tooling, CI, or deployment moderation/pending PR is in the moderation queue awaiting review needs-review Awaiting domain expert review labels Sep 3, 2026
@itsmeront
itsmeront merged commit f9ff9fe into main Sep 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infrastructure Changes to tooling, CI, or deployment moderation/pending PR is in the moderation queue awaiting review needs-review Awaiting domain expert review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant