Menu

Give the agent the existing analytics event names, not a new tracking string
📰

Give the agent the existing analytics event names, not a new tracking string

DEV Community: frontend·Sherotree·2 days ago
#rZd3Q5BC
#devtofrontend#devto#dev#event#name
Long article (481 words) — no AI summary yet.
Reading 0:00
15s threshold

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 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.