HeadlinesBriefing favicon HeadlinesBriefing.com

Detecting ChatGPT Traffic in Analytics

DEV Community •
×

A developer built Zyro to solve analytics blind spots, specifically traffic from AI engines like ChatGPT, Perplexity, and Claude that standard tools mislabel as 'Direct'. The platform uses a server-side crawler with HtmlAgilityPack to parse DOM trees, avoiding fragile CSS selectors that break with site updates. It also implements a linear multi-touch attribution model with a 30-day lookback window.

The system's 'Traffic Brain' parses over 50 signatures, including ad identifiers from Google, Meta, and TikTok. Storing URLs in a custom SQL schema with NVARCHAR(MAX) columns prevents data truncation. For A/B testing, it renders elements in a sandboxed iframe, allowing visual editing before changes go live. Asset swaps are automatically uploaded to AWS S3 and served via CloudFront for speed.

Zyro tracks intent scores based on micro-behaviors like text copying or pricing dwell time. These server-side events dispatch to ad platforms like Meta CAPI, enabling retargeting of high-intent users to lower customer acquisition costs. The stack includes .NET, SQL Server, and uses Thompson Sampling for traffic optimization. Future updates aim to refine an 'Anti-Flicker' engine and expand AI detection.