Back to browse
GitHub Repository

A lightweight script to detect AI traffic

2 starsJavaScript

AI Referral Detector – See which AI sent traffic to your site

by grandlaps·Mar 3, 2026·2 points·1 comment

AI Analysis

MidSolve My ProblemDark Horse

Spots AI referrals when Google Analytics shows 'Direct'—but referrer-based detection is trivial to spoof.

Strengths
  • Addresses a real gap: no existing analytics tool isolates AI traffic from mislabeled 'Direct' visits
  • Covers 8+ AI sources (ChatGPT, Perplexity, Claude, DeepSeek, Grok) with structured event payloads
  • Zero dependencies, no cookies—low-friction drop-in script with optional self-hosted backend
Weaknesses
  • Purely referrer-based: easily spoofed by redirects, proxy chains, or copy-paste URLs from AI sessions
  • No IP-based validation or behavioral clustering—high false-positives if someone bookmarks an AI link
  • Google Analytics 4 already has custom event tracking; this solves a 2–3 line implementation problem
Category
Target Audience

E-commerce and SaaS founders who want to measure and optimize for AI-driven traffic

Similar To

Google Analytics 4 · Amplitude · Mixpanel

Similar Projects

SaaS●●Solid

Digital identity pages with traffic quality

This is a link-in-bio take with a useful twist: per-page 'human score' from request fingerprinting, first-click tracking and referrer breakdowns give you more actionable signal than raw view counts. The UI and a Figma-style canvas feel well thought-out, but the idea lives in a crowded market and the fingerprinting/heuristic rules need clearer documentation and opt-out/privacy options before the analytics can be trusted widely.

Niche GemSlickShip It
m6jo9
214mo ago
Infrastructure●●●Banger

ChaosRank – which microservice should you break next?

Replaces gut-feel chaos picks with principled risk ranking: 9.8x faster weakness discovery.

Big BrainSolve My Problem
Medinz01
103mo ago
DataMid

Traffic Breakdown of a Front Page Surge

The post actually delivers useful, concrete numbers — hour-by-hour hits, peak/plateau duration, and referral spread — plus the practical ops note that a home server behind Cloudflare survived ~60k visits. Good, pragmatic reading for anyone planning a Show HN drop; I wanted more on bot-filtering and raw data access or interactive charts, but the timeline and deployment notes are the real takeaways.

Niche GemShip It
intervolz
203mo ago
Social●●Solid

Real-Real-Time Chat

Live keystroke visibility beats Discord's typing indicators, but privacy tradeoffs remain unclear.

Ship ItNiche Gem
levmiseri
10101mo ago