Form submissions are among the most valuable conversion events on any website—contact requests, lead gen forms, demo bookings, newsletter signups. Yet many teams still rely on destination URL goals to track them, missing form field data and partial completions. This guide shows you how to track form submissions in GA4 using GTM with full event parameter capture.

Two GTM Methods for Form Tracking
GTM offers two built-in triggers for form tracking. The Form Submission trigger fires when a form’s submit button is clicked, before the page navigates away—ideal for capturing form field data. The Element Visibility trigger fires when a thank-you message appears after submission, useful for AJAX forms that don’t navigate to a new page. For most implementations, Form Submission is the right choice; use Element Visibility for single-page forms that display inline confirmation messages.
Step-by-Step GTM Setup
Step 1: In GTM, enable Built-In Variables: Form ID, Form Classes, Form Element, Form Target, Form URL, Form Text. Step 2: Create a new Trigger, type: Form Submission. Set “Wait for Tags” to 2000ms (ensures GA4 tag fires before form submits). Enable “Check Validation” so the trigger only fires on valid form submissions. Step 3: Create a GA4 Event tag with event name “form_submit” and these parameters:
// GTM GA4 Event tag parameters for form tracking:
Event Name: form_submit
Parameters:
form_id: {{Form ID}}
form_name: {{Form Classes}} // or use a custom lookup for human-readable names
form_destination: {{Form URL}}
// Optional: capture specific field values (with user consent)
// Create a Custom JS Variable to read field values:
function() {
var form = {{Form Element}};
return form ? form.querySelector('[name="email"]').value : '';
}
// Then add: form_email_domain: {{Form Email Domain}}

Handling AJAX and Multi-Step Forms
AJAX forms (like HubSpot, Gravity Forms, or Contact Form 7) don’t submit via traditional form POST—they use JavaScript to send data and display a success message inline. For these, use an Element Visibility trigger targeting the thank-you message element (.form-success, .wpcf7-response-output, etc.). Alternatively, listen for the plugin’s JavaScript callback event and push it to the dataLayer:
// For Contact Form 7 AJAX success:
document.addEventListener('wpcf7mailsent', function(event) {
window.dataLayer.push({
event: 'cf7_form_submit',
form_id: event.detail.contactFormId,
form_response: 'success'
});
});
| Form Type | GTM Trigger | Reliability |
|---|---|---|
| Standard HTML form | Form Submission trigger | High |
| AJAX form (CF7, WPForms) | Element Visibility or dataLayer push | High |
| React/Vue form | Custom dataLayer event | High |
| Embedded iFrame form | postMessage listener | Medium |
FAQ
How do I prevent test submissions from appearing in GA4? Add a GTM trigger exception for internal IP addresses using a custom JavaScript variable that returns the user’s IP, and exclude your office IP range. Can I track which form field caused abandonment? Yes—use field blur events with a custom JS variable that records the last focused field. Fire a form_abandon event if the form isn’t submitted after field interaction. Do I need consent before tracking form submissions? You should obtain consent before tracking any form interaction data. Use a CMP and GTM’s consent mode to delay form tracking tags until consent is granted.
Conclusion
Setting up form submission tracking in GA4 using GTM transforms your lead generation analytics from guesswork to precision. With form_id, form_name, and field-level parameters, you can identify which forms convert best, which fields cause abandonment, and which traffic sources generate the highest-quality leads. Implement this tracking on every form on your site and use GA4’s funnel explorations to visualize the complete lead generation journey.