1
0 Comments

Turns out, I have auto-instrumentation

PostHog just announceed PostHog Code, which is AI that auto-adds tracking to your codebase. Separate product, own pricing.

This made me realise I might already have something similar by accident. My coding agent has both my codebase and my analytics in the same session via MCP. If I tell it to care about tracking, it sees what it's building, checks what events already exist, and fills the gaps on its own.

The "tell it to care" part was a few lines in my CLAUDE.md, telling it to make sure to add tracking calls, check bounce rates, etc.

First thing it caught was five components I'd shipped over two days with zero event tracking. Comparison pages, pricing buttons, an interactive demo. All user-facing, none tracked.

I don't know if this holds up. It's been a few days. The instructions might be too vague, or the agent might need something more structured to do this reliably. But the gap between "has access to analytics" and "uses analytics while coding" was a lot smaller than I expected.

posted toAvatar for product Lodd.dev
Lodd.dev