Forms come in many forms: native website forms, CMS plugins, embedded HubSpot or Typeform forms, multi-step forms and forms that submit without reloading the page. Google Tag Manager form tracking needs a method suited to how each form behaves.

Choosing the right Google Tag Manager form tracking method

GTM form tracking methods ranked by reliability
MethodReliabilityWhen to use
Data layer event on successHighestYou can edit website code or the form tool supports callbacks
Thank-you page viewHighForm redirects to a unique confirmation page
Element visibility (success message)Medium to highAJAX forms that show a success message without redirect
Built-in Form Submission triggerMediumStandard HTML forms that fire a submit event
Click trigger on submit buttonLowAvoid; counts failed submissions

Method 1: Data layer event (recommended)

When the form submits successfully, the website pushes an event:

window.dataLayer.push({event: "generate_lead", form_name: "contact", form_location: "contact-page"});

In GTM:

  1. Create Data Layer Variables for form_name and form_location.
  2. Create a Custom Event trigger for the event name generate_lead.
  3. Create a GA4 Event tag that sends generate_lead with parameters.
  4. Test in Preview mode.

Google's documentation explains the data layer in detail. Many form tools (HubSpot, Gravity Forms, Webflow and others) expose success events or callbacks you can use.

Method 2: Thank-you page

If the form redirects to /thank-you, create a Page View trigger with a condition on the page path. Make sure the thank-you page is not linked elsewhere or indexed, otherwise visits without submissions will be counted. Use separate thank-you pages or URL parameters to distinguish forms.

Method 3: Element visibility for AJAX forms

Many forms show a success message instead of redirecting. Use an Element Visibility trigger targeting the success message element (by ID or CSS selector), with "Observe DOM changes" enabled. Trigger only once per page. This tracks successful submissions without code changes.

Method 4: GTM form submission trigger

GTM's Form Submission trigger listens for the browser's submit event. Enable "Check validation" so it fires only when the form passes browser validation, and restrict it to the specific form. It does not work for forms that submit via JavaScript without a standard submit event, and it cannot confirm server-side success.

Sending form tracking to GA4

In the GA4 Event tag, use generate_lead (a recommended event) or a clear custom name, include parameters such as form_name, and mark the event as a key event in GA4. Our GA4 lead generation tracking guide covers the GA4 side.

Testing with GTM preview mode

  1. Open Preview mode and connect to your site.
  2. Submit the form with valid data.
  3. Confirm the trigger fires once and the tag sends the correct parameters.
  4. Submit with invalid data and confirm nothing fires.
  5. Check GA4 DebugView to see the event arrive.
  6. Repeat on mobile and different browsers.

Multi-step forms

For multi-step forms, push a data layer event at each step (form_step with step number) and a final generate_lead on completion. This shows where people drop off, which feeds form conversion rate optimization.

Avoiding duplicates

  • Disable GA4 enhanced measurement form interactions if they duplicate your custom events.
  • Use "once per page" trigger settings where appropriate.
  • Check that hard-coded GA4 tags are not also sending the same event.

Privacy

Never send personal information such as names, email addresses or phone numbers in event parameters. Respect consent settings in GTM using Consent Mode and consent-aware triggers; see our Consent Mode v2 guide.

Tracking popular form tools

Different tools expose different signals. Native CMS forms often allow a redirect or a success message; HubSpot embedded forms provide message events you can listen for; Gravity Forms and similar WordPress plugins offer confirmation hooks; Webflow forms display a success block suitable for element visibility triggers; scheduling tools such as Calendly send messages when a booking is completed. Check each tool's documentation for a success callback before falling back to less reliable methods.

Documenting your setup

Keep a simple tracking plan: each form, its tracking method, trigger, event name, parameters and owner. When websites change, tracking breaks quietly; documentation makes problems quicker to find. Include form tracking checks in your website maintenance checklist.

If your form tracking is unreliable or you are moving to a new website, our conversion and analytics team can implement and test it end to end.

Frequently asked questions

Why is my GTM form submission trigger not firing?
Common reasons include forms submitted with JavaScript without a standard submit event, forms inside iframes, validation settings, or the trigger being restricted to the wrong form.
What is the most reliable way to track form submissions?
A data layer event pushed by the website or form tool after a confirmed successful submission is the most reliable method.
Can GTM track HubSpot or Typeform forms?
Yes, usually through the provider's success callbacks or events, or by redirecting to a thank-you page on your domain. Direct tracking inside cross-domain iframes is not possible.
Should I track form starts?
Tracking form starts and steps helps diagnose abandonment, but keep them as separate events from completed leads.