Lesson 7 of 7
Writing A Tagging Spec For Developers
The tagging spec is what you hand a developer to implement the dataLayer. The more specific it is, the less back-and-forth you get. It translates each event in your plan into an exact push.
What each entry needs
- The exact
eventname and when it should fire. - Each parameter, with its type and an example value.
- Any page context that must be present before the snippet.
- Acceptance criteria you will check in Preview.
Event: generate_lead
Fires: on successful contact-form submit (after server 200)
Push:
{
event: "generate_lead",
form_id: string // e.g. "contact-footer"
value: number // estimated lead value, e.g. 50
}
Accept: event appears once per submit, form_id matches the formHand this over, then verify the implementation in Tag Assistant against the acceptance criteria before you build the tags that depend on it.
Key takeaway
A precise spec, exact names, typed parameters, example values and acceptance criteria, is the difference between one implementation pass and five.