What to record for each form
A form has a FunnelModel of the customer journey stages. of its own, and the forms guide lists its stages: the first interaction, the fields, the submit attempt, the error and the successful submission. Four events cover them for most sites. Each carries the form's name as an event parameterA named value sent with an analytics event that describes it, such as a page location, form name or item price., so one event serves every form, as the events and parameters guide recommends.
| Event | Fires when | Parameters | Answers |
|---|---|---|---|
form_start | The visitor first interacts with any field, once per form per page | form_name | Does the page get people into the form? |
form_error | The form shows a validation error, or the server rejects the submission | form_name, field_name, error_type | Which field and rule stops people? |
form_step | A step of a multi-step form is completed and accepted | form_name, step_number, step_name | Where in a long form do people leave? |
generate_lead | The server has accepted the submission | form_name, lead_type | How many real enquiries did each form produce? |
generate_lead is one of the recommended events the events guide lists; use sign_up instead for account
creation, because a lead and a registration mean different things to the business. The other three are custom
events with names your tracking plan fixes. None of them carries anything the visitor typed. Field values are
personal data far more often than anyone expects, and the
guide to keeping personal data out of analytics lists
form fields among the commonest routes by which it leaks.
Before you start
- The building blocks. The tags, triggers and variables guide covers custom event triggers and data layer variables, and warns that form triggers fire on attempts.
- A data layer contract. The data layer guide explains pushes, timing and the contract table; every event below is a row in it.
- A developer who can change the forms, or for a form you cannot change, the section near the end of this page.
- The GA4 configuration in the container, built as the GA4 through GTM tutorial shows, and a property role that can register custom definitions.
- The lead system's own count for a recent closed day, from the CRM or quote system, to reconcile against after publishing.
- Preview mode working on the site, with a test address the sales team knows to ignore, following the debugging tutorial.
List every form and how it submits
Walk the site and record every form: the page or template, a short controlled name such as
quote_homeorcontact, what a submission means to the business, and how the form submits. Four patterns cover most sites. A form that reloads to a thank-you page; a form submitted by script, which shows a message without leaving the page; a multi-step form; and a form embedded from another service in a frame. The method decides the build: the browser's own submit can be seen by a form trigger, a script submission may never produce one, and an embedded form runs in someone else's page. Note who owns each form's code and whether it can change. The inventory becomes rows in the tracking plan and, later, the list the tests walk through.Agree the success push with developers
The success signal is a data layerA structured object on a web page that passes values to a tag manager for tags to use. push sent after the server accepts the submission, never on the click. For a script-submitted form, the push goes in the success callback; for a reloading form, it is rendered once on the confirmation the server returns, not on a thank-you address that anyone can reload or bookmark. Agree the keys and their allowed values, and add the row to the contract.
window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: "generate_lead", form_name: "quote_home", lead_type: "quote" });If the page navigates away immediately after the push, the data layer guide describes the
eventCallbackandeventTimeoutoptions that let the container's tags send before the browser leaves.Build the submission trigger and tag
In the container, create data layer variables for
form_nameandlead_type, a custom event trigger ongenerate_lead, and one GA4 event tag with the event namegenerate_leadand both parameters read from the variables. In the property, register both parameters as event-scoped custom dimensions so reports can split leads by form; the events guide explains that unregistered parameters never reach reports. Remove or pause the old form submission or click trigger in the same workspace, because running both counts every lead twice. Markinggenerate_leadas a Key EventA GA4 event marked as important to the business, the property's measure of success. and choosing its counting method belong to the key events guide.Add the form start event
A form start is the first interaction with any field, recorded once per form per page however many fields are touched. The cleanest source is the site: a listener on the form pushes
form_startwith the form name on the first input and then sets a flag so it never pushes again for that form on that page. Where developers cannot add it, a reviewed custom HTML tag in the container can attach the same listener, at the cost of script the governance process must read. Build a custom event trigger and a GA4 event tag as in the previous step, reusing theform_namevariable. If the data stream's enhanced measurement form option is on, switch it off when this event goes live, soform_startarrives from one source under one rule. Starts divided by page views tell you whether the page gets people to the form at all.Record validation errors by field
Push
form_erroreach time the form shows an error, with the form name, the field's name from a controlled list, and the kind of rule that failed, such asrequiredorformat. Server-side rejections count too: a submission refused for a duplicate or an unsupported postcode is an error the visitor saw, so the server's response should trigger the same push. Never send the message text if it can echo what was typed, and never send the value. Registerfield_nameanderror_typeas event-scoped dimensions. Errors by field and by device are the reading the form abandonment guide relies on to separate a confusing rule from a hostile phone keyboard. Failures outside forms, such as missing pages, refused payments and empty listings, are recorded the same way in the tutorial on tracking errors and failed actions, which readsform_erroralongside them.Handle multi-step forms
For each step, push
form_stepwhen the step is completed and accepted, with a step number and a short step name, rather than when the step is displayed. The final step's success is stillgenerate_lead, so the lead count stays comparable across single and multi-step forms. If the steps change the address without reloading the page, rely on these pushes rather than history change triggers, which the data layer guide shows firing on changes that are not steps. A funnel exploration withform_start, eachform_stepandgenerate_lead, narrowed byform_name, then shows where a long form loses people.Test the negative cases
In preview, with DebugView open, prove what must not happen as carefully as what must. Submit the empty form: errors per required field, no lead. Submit an invalid format: one error, no lead. Trigger a server rejection: an error, no lead. Submit successfully and reload the confirmation: one lead only. Double-click the submit button: one lead. Start the form and leave: one start and nothing else. Use two forms on one page: two starts, each with its own name. Then read every parameter in DebugView and confirm none holds anything a visitor typed. Repeat with analytics consent refused, where nothing should reach the property.
Publish and check the reports
Publish with a version note listing the forms covered and the tests passed. The next day, read the events report for the four events, split leads by
form_name, and reconcile one closed day ofgenerate_leadagainst the lead system's own count. Expect GA4 to be a little lower, for consent and blockers; investigate a large gap or one form that is far out, using the diagnosis for GA4 not tracking form submissions to find the cause form by form. Build the form funnel and an errors-by-field table in explorations, and use the conversion rate calculator for completions over starts. From here, reading the numbers and changing the form belongs to the CRO guides, and a change such as fewer fields can be tested as the lead form length experiment describes.
One quote form, tracked (illustrative)
Ploverstitch Home Insurance replaces a click trigger
Ploverstitch Home Insurance, an invented home insurer, measured its quote form with a form submission trigger
on the submit button, sent to GA4 as quote_submit. In October the property recorded 4,860 quote
submissions; the quote system recorded 2,910 quotes issued. The gap was every attempt that failed: an empty
required field, a postcode the rating engine did not cover, a date of birth in the wrong format.
The rebuild followed the steps above. The developers added a generate_lead push in the quote system's
success response with form_name: "quote_home" and lead_type: "quote", a form_start push on first input,
and a form_error push for each client and server error with the field name. The click trigger was removed in
the same release. November's figures:
| Measure | November |
|---|---|
Form starts (form_start) | 9,400 |
| Errors on postcode | 1,620 |
| Errors on date of birth | 880 |
| Errors on rebuild value | 640 |
Confirmed quotes in GA4 (generate_lead) | 2,850 |
| Quotes issued in the quote system | 2,930 |
GA4 now sits about 3% below the quote system, which the team accepts as visitors who declined analytics. The postcode errors split almost entirely into one cause: people typing the postcode without a space, which the form rejected. Accepting both formats is the first change the CRO team tests.
Forms you cannot change
Some forms belong to a platform, a plugin or a third party, and no developer can add a push. The options, in order of how close they come to a confirmed submission:
| Source of the success signal | How | Weakness |
|---|---|---|
| A confirmation page that renders only after success | Custom event or page view condition on that page; the events guide also describes a create event rule that derives a lead from it | A reload or bookmark counts again unless guarded |
| A success message that appears on the page | Element visibility trigger on the message | Breaks when the message's markup changes |
| The form trigger with validation enabled | The building blocks guide describes the option that fires only when the browser would submit | Still counts submissions the server rejects |
| A click on the submit button | Click trigger | Counts every attempt; do not use for leads |
Treat any of these as a stopgap, written into the tracking plan with its weakness, while the request for a proper push is pursued. A form embedded from another service inside a frame is a different problem, because your container cannot see inside it at all; the guide to embedded widgets and hosted pages sets out the options there.
Common mistakes
- Counting the click. Attempts, failed validation and server rejections reported as leads.
- Old and new triggers running together. The replacement ships and the click trigger stays, so every lead counts twice.
- One event per form.
contact_submit,quote_submitandcallback_submitwhere one event with aform_nameparameter would do. - Field values in parameters. An error event that sends what the visitor typed sends personal data.
- Form starts on every keystroke. Without a once-per-form flag, starts are counted per field and the start-to-lead rate means nothing.
- A thank-you address as the only signal. Reloads, bookmarks and the back button add leads that never happened.
- Step events on display. A step counted when shown, not when completed, hides where people actually stop.
- Skipping the reconciliation. Without a closed day compared with the lead system, nobody knows whether the new count is right.
The Tag Manager hub lists the other guides in this section, and the data layer guide covers the contract and timing rules every push here follows.
