Data & Attribution

Write the Tracking Plan Before the Code

8 min read
Write the Tracking Plan Before the Code

Analytics implementations degrade in a predictable way. Someone adds an event called buttonClick. Someone else adds button_clicked. A third person adds cta_click_v2. Six months later nobody can answer a simple question without an archaeology session, and the instinct is to rebuild rather than to fix the naming.

A convention worth enforcing

Use object-action in lowercase with underscores: checkout_started, subscription_cancelled, article_viewed. Objects come from your domain vocabulary; actions are past-tense verbs. The value is not in this particular convention but in having exactly one.

ColumnExample
Event namecheckout_started
TriggerUser submits the cart form
Propertiescart_value, item_count, currency, payment_method
OwnerNamed person or team
Question it answersWhere do people drop out of checkout?

Properties, not proliferation

Resist creating checkout_started_mobile and checkout_started_desktop. Device belongs in a property. The rule: if two events would be analysed together, they are one event with a distinguishing property.

An event with no stated question behind it will be implemented, never queried, and maintained forever.

Validate automatically

Define the plan as a schema and check payloads against it in the build pipeline. Events that do not match the schema fail before release. This single control does more for long-term data quality than any amount of dashboard monitoring after the fact.

A typical mid-sized product needs 30 to 60 well-chosen events. Implementations with hundreds usually have a handful in active use and a large maintenance burden.

Deprecate on purpose

When an event is no longer needed, mark it deprecated in the plan, announce it, keep it firing for a defined window, then remove it. Silent removal breaks reports that people were relying on, and the resulting loss of trust takes far longer to repair than the event took to delete.

Related articles

The Quarterly Data Quality Audit
Data & Attribution

The Quarterly Data Quality Audit

Most bad decisions made from data are not made from the wrong analysis. They are made from the right analysis on broken inputs.

8 min read