What is a tracking plan?
The agreed spec of every event you record, the contract that keeps your funnels and retention curves built on events that fire the same way everywhere.
What goes in a tracking plan
A tracking plan is not long, it is precise. For every event you intend to record, it pins down:
- ·The event name, exactly, so signup_completed is the name and sign_up is not a silent second event.
- ·The properties it carries and their types (plan: string, amount: number), so a breakdown you want later is actually possible.
- ·What it means, one line, so two people instrument the same action the same way instead of inventing two events for it.
Drift, and why plan-as-code beats a spreadsheet
The reason plans fail is drift: reality slowly stops matching the plan. A new event ships that the plan never listed. An event stops firing but is still expected. A property gets renamed. Nothing breaks loudly, so nobody notices, until three months later the funnel has holes and the dashboard has lost everyone's trust.
A spreadsheet cannot stop any of this, it is documentation, not enforcement, and it goes stale the day someone ships an event it never mentioned. Plan-as-code puts the plan in the repo where a checker can act on it: compare the plan to the code, compare it to live traffic, and fail the build when they diverge. Drift stops being slow data rot and becomes a build error you fix in the same PR that caused it.
A committed plan with drift gates, plus an agreement test
smolanalytics keeps the tracking plan as a committed file and enforces it two ways:
The plan keeps your events clean. A second, stronger guarantee keeps your answers clean: a CI agreement test asserts that the AI's answer equals the /v1 API equals the dashboard, byte for byte. So a number cannot be hallucinated: if the ask-bar answer ever drifts from the API or the dashboard, the build fails. Every answer also ships a computed_by receipt, the exact deterministic report and scope behind it, so you can see why a number is what it is.
This pairs with event instrumentation: the agent writes and verifies the events, the plan keeps them from drifting. See every feature.