Blog

How to Track Form Events in Google Tag Manager

By
The Reform Team
Use AI to summarize text or ask questions

I track successful form submissions - not just clicks on “Submit.” In Google Tag Manager, I use a confirmed success signal to send 1 GA4 event per accepted submission.

Here’s my setup checklist:

  • Check access: Confirm GTM and GA4 are installed, then enable form variables.
  • Choose the signal: Use a server-confirmed event, a success-only redirect, or a verified thank-you message. A native submit alone doesn’t prove success.
  • Build the tracking: Target the right form with a trigger and send a GA4 event, such as generate_lead, with non-sensitive form details.
  • Test both outcomes: Check valid and failed attempts in GTM Preview, then verify events in GA4 Realtime and DebugView. Remove duplicate tracking.
  • Publish and recheck: Save version notes, confirm the live event and backend entry, and retest after form changes.

My rule: <u>count accepted submissions only</u>, and never send names, email addresses, phone numbers, or field answers to GA4.

GTM Form Tracking: From Submission to GA4

GTM Form Tracking: From Submission to GA4

Create a Trigger for Your Form

Set Up a Form Submission Trigger

Choose your trigger type based on the success signal you identified earlier. For native form submits, go to Triggers → New → Trigger Configuration → Form Submission and name it Trigger - Contact Form Submit.

Enable Check Validation to require browser-side validation. Turn on Wait for Tags only if navigation could interrupt tracking, and start with a 2,000 ms timeout.

Limit the Trigger by Form and Page

Select Some Forms, then filter by a form-specific Form ID or Form Classes. Add Page Path or Page URL only if the same form appears on multiple pages. Use AND logic so both conditions must match.

In GTM Preview, check the form event’s variables to confirm your filters work. Test an unrelated form and a submission with an empty required field. Neither should fire your successful-submission tracking. If the form uses AJAX or an iframe, switch to a custom event trigger.

Use a Custom Event for Confirmed Submissions

Use a custom event only when GTM can’t reliably detect a normal form submit. For AJAX or JavaScript-driven forms, ask a developer to push a dataLayer event from the form’s success callback.

Then create a Custom Event trigger using the exact event name. Add a Data Layer Variable condition to target the right form.

For forms built with Reform, the integration sends reform.onFormCompleted to the dataLayer. Filter by reformContext.form.id to target the right form. For cross-origin iframe embeds, use this custom event instead of the standard Form Submission trigger.

Send Form Submission Events to GA4

Set Up the GA4 Event Tag and Parameters

Once your trigger is ready, set up one GA4 event for each confirmed submission. In GTM, go to Tags → New → Tag Configuration → Google Analytics: GA4 Event. Name the tag GA4 - Form Submission. Enter your web stream’s Measurement ID directly or through a Constant variable, and choose a consistent lower_snake_case event name.

Example event names: generate_lead or form_submit.

Add non-sensitive parameters such as form_id and form_name so you can tell forms apart in GA4. If you need these parameters in reports, register each one as an event-scoped custom dimension.

Never send email addresses, phone numbers, names, or other personally identifiable information to GA4. Check page_location and other URL-based variables for personal data in query strings. Track the submission event in GA4, but keep lead qualification and CRM stages in your CRM.

Attach the Trigger and Avoid Duplicate Events

Under Triggering, select the confirmed-submission trigger you created. Then check for duplicate tracking in other GTM tags, hardcoded analytics snippets, and GA4 Admin → Data Streams → your web stream → Enhanced measurement → Form interactions. Disable Form interactions if your GTM tag already sends form_submit. Mark only the accepted submission as a key event.

Each accepted submission should fire one event. Intermediate steps, failed attempts, and retries should not count as extra completions.

Test Form Tracking in GTM Preview and GA4

Check Events and Tags in Tag Assistant

Test your setup in Preview before publishing. In GTM, click Preview, connect the form page, and submit a valid test entry. In Tag Assistant, select the accepted-submission event that matches your trigger. Review Tags Fired, the trigger conditions, and Variables to confirm the GA4 event tag used the expected form values.

Test each relevant form, multi-step flow, and success redirect. Then try submitting with blank required fields or an invalid email address. For these failed attempts, the form event tag should appear under Tags Not Fired. Check the full event timeline - not just the last event - for unexpected firings. If a failed attempt fires the tag, fix the trigger before moving to GA4.

Verify Events in Realtime and DebugView

Once Preview confirms that the tag fires correctly, check the same event in GA4. With debug mode enabled for your test session, open GA4 → Admin → Data display → DebugView. Select the accepted-submission event and inspect its parameters, including form_id and form_name. Check that the values don't contain email addresses, names, or phone numbers.

Use Realtime to confirm incoming activity and DebugView to inspect parameter details. Standard reports take longer to update, so an empty report right after a test doesn't mean tracking failed.

Fix Missing or Duplicate Events

If events are missing, check the container installation, trigger filters, Measurement ID, and variable values. Also compare the workspace you're previewing with the published version. In the browser's Network tab, check for AJAX submissions, canceled requests, and iframe boundaries. If the form confirms success only after a server response, fire the tag from that success signal rather than the native form submit.

For duplicate events, check for repeated listeners, overlapping tags, or GA4 Enhanced Measurement running alongside your custom tag. If DebugView remains empty, review debug mode and consent settings.

How to Track Form Submissions in GTM & Send as GA4 Event | Step-by-Step Guide

Conclusion: Publish and Maintain Form Tracking

Use Preview and DebugView to confirm the tag fires correctly. Publish only when each accepted submission sends exactly one event. Send only non-sensitive parameters - never field answers or contact details.

In GTM, click Submit, then Publish and Create Version. Record the version date, form ID, success signal, trigger conditions, GA4 event name, consent requirements, and owner. Keep the previous published version available for rollback. Store the regression checklist with the version notes so it’s ready for future tracking updates.

Once the version is live, submit one test entry with non-sensitive data and check for the event in GA4 Realtime. Separately, confirm that the lead reaches the CRM or backend.

Retest whenever fields, embeds, validation, redirects, consent settings, or submission flows change.

FAQs

How can I prevent duplicate events after a page refresh?

Check that Google Tag Manager handles consent and tag firing states correctly. Use the Consent Initialization trigger to run consent logic and update analytics and storage states before marketing tags initialize.

Test page reloads, return visits, and different browsers to confirm that form scripts receive consent signals before they run. For CRM or email marketing integrations, set up native duplicate detection rules to prevent duplicate entries.

Some tracking systems require explicit consent before logging activity. If a visitor submits a form before accepting your tracking consent banner, that submission may not be logged.

Follow applicable privacy requirements, such as CCPA, and get any required consent before contacting people. Make sure your data handling and tracking settings match your privacy policies. Don’t include sensitive information in analytics events.

Why don’t my GA4 submissions match my CRM totals?

GA4 and CRM totals can differ because of duplicate events, tracking that fires too early, ad blockers, privacy settings, or cookie consent.

Check that GA4 tracks only final, validated submissions - not intermediate steps or button clicks before server-side validation. Also check whether Enhanced Measurement and custom GTM tags track the same submission.

Your CRM records submissions directly. Use Reform analytics as your baseline to find where the numbers differ; a gap under 5% is typically considered normal.

Related Blog Posts

Use AI to summarize text or ask questions

Discover proven form optimizations that drive real results for B2B, Lead/Demand Generation, and SaaS companies.

Lead Conversion Playbook

Get new content delivered straight to your inbox

By clicking Sign Up you're confirming that you agree with our Terms and Conditions.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
The Playbook

Drive real results with form optimizations

Tested across hundreds of experiments, our strategies deliver a 215% lift in qualified leads for B2B and SaaS companies.