Classify OIR traffic: human, AI, crawlers, bots - #117
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Stats page now shows:
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.