I Replaced Google Analytics with a CSV File and an AI Agent (joeldare.com)

🤖 AI Summary
Joel Dare replaced Google Analytics with a tiny, privacy-first pipeline: every HTTP request appends a single CSV row (URL,timestamp) to stdout from a compact Go collector binary running on a low-end VPS under SupervisorD. The CSV is redirected to persistent disk (or could be piped to pub/sub), copied down via SSH or cron, and lives as a plain file in his repo. Instead of building a dashboard, he runs a local LLM agent (Codex) inside the repository that reads the CSV and generates Python or shell snippets to answer natural-language queries — e.g., top utm_source values, or comparing /newsletter traffic to a baseline. Helper scripts are persisted in _tools/, and all processing stays local: no cookies, no IDs, no JavaScript, no consent popups, and nothing leaves the machine. For the AI/ML community this is a crisp example of combining minimal, auditable telemetry with local model-driven analytics to avoid surveillance and SaaS lock-in. It shows how LLMs can act as on-device query-generators for structured logs, lowering the barrier to custom analysis while keeping data ownership and privacy intact. Trade-offs are clear: you lose user-level sessions, real-time dashboards, and richer client-side metrics, but you gain a tiny attack surface, reproducibility, lower cost, and a privacy-preserving workflow that scales from a hobby site to any use case where aggregate, event-level insights suffice.
Loading comments...
loading comments...