The PR adds a new button or a completed flow, and the agent drops track("cta_clicked") or analytics.capture("new_feature_used", { ... }) with a name it just made up. Properties are ad-hoc. The casing does not match the rest of the catalog. Downstream dashboards already expect names from a shared event map. The repo already has that map or a typed helper, and nearby signup and settings actions already use it.
I've started treating a new tracking string in a feature file as a schema change, not as a harmless log line. Firing an event is the easy part. A stable name, a documented property list, and one place to add a new event are why the catalog is there.
Why the invented name shows up
A tutorial analytics call is a free-form string. The model can write track("button_click") without finding analytics/events or trackEvent. Your helper may already type the allowed names, or the map may live in a JSON file that is easy to miss if the prompt only says "add tracking."
You also skip reserved properties, the rule about not sending PII, and the difference between a new event and a new property on an existing event.
A simple analytics-name policy
- New feature tracking uses an existing event name, or adds a name in the shared catalog first
- Do not invent a string literal in a feature file
- Keep property shapes on the documented schema
- A new event or property is a catalog change, with a short note for whoever owns the dashboard
If the action is already covered by an existing event, add or reuse a property instead of minting a near-duplicate name. If this surface should not be tracked, do not add a "just in case" event.
What to put in the prompt
Use an existing analytics event name from the shared catalog for this action.
Do not invent a new track() string in this file.
If no event fits, add the name and properties to the catalog first, then call the existing helper.
Do not send PII, and do not duplicate an event that already covers this action.
Paste the catalog path and one existing call. In review, search the diff for raw track("...) or capture("...) literals that are not imported from the map, and for new property keys that are not on the schema.
Reject / send back
Reject
- A feature-level event name that does not exist in the catalog
- A near-duplicate of an existing event invented for one button
- Ad-hoc properties that break the documented schema, or that include PII
- A second analytics SDK added to fire one event
Accept
- A call that uses an existing catalog name and helper
- A catalog PR that adds a documented event or property and a short dashboard note
- A surface left untracked when that is already the product decision
Top comments (0)