How to Track Form Submissions in Google Tag Manager?

Share
This is some text inside of a div block.
copy
Vikash Koushik
Head of Content & Community @ AdConversion

I’ve spent a lot of time wrestling with tracking form submissions in Google Tag Manager (GTM), and I know how frustrating it can be when things just don’t work as expected. 


Forms behave in all sorts of unpredictable ways. Some refresh the page, some stay put, and others redirect users to a "Thank You" page. 


And because there’s no universal rule for how developers build forms, you and I need different tracking approaches depending on the situation.


And since chances are you’re using form submission to also track how your Google ad campaigns are converting, it becomes super critical for us to get this right. 


That’s why in this guide, I’ll break down the most effective ways to track form submissions, step by step, so you don’t have to figure it all out the hard way like I did.

Understanding the Tag and Trigger Relationship in GTM

Before we dive into the methods, let’s quickly cover the basics. GTM relies on two key components:

  • Tags: These send data to platforms like Google Analytics 4 (GA4).
  • Triggers: These tell GTM when to fire a tag.


To track form submissions properly, you need:

  1. A GA4 event tag that sends a form submission event to GA4.

  2. A trigger that detects when a form is successfully submitted.

Step-by-Step: Creating a GA4 Event Tag

  • Go to Tags in GTM and click New.

Create Tag - Track Form Submissions in Google Tag Manager


  • In Tag Configuration, select Google Analytics: GA4 Event.

Event Tag - Track Form Submissions in Google Tag Manager



  • In the Measurement ID field, insert your GA4 tracking ID (or use a Constant Variable if you’ve set one up).
  • In the Event Name field, enter "generate_lead" (this is a recommended GA4 event, but you can change it if needed).

Tracking ID - Track Form Submissions in Google Tag Manager


  • Leave the Triggering section empty for now. We’ll configure that next.
  • Click Save.


At this point, the tag exists but doesn’t do anything because there’s no trigger.

Now, let’s set that up based on how your form behaves.

Method 1: Track Form Submission Using GTM’s Built-in Form Submission Trigger

In an ideal world, GTM’s built-in Form Submission trigger would work for every form. 


But in my experience, it rarely does. This trigger only works if the form fires a native submit event, which many modern forms (especially AJAX-based ones) don’t.

Step-by-Step: Configuring the Form Submission Trigger

  • In GTM, go to Variables > Configure and enable all Form Variables (Form ID, Form Classes, Form Target, Form Text, etc.).

Variables - Track Form Submissions in Google Tag Manager



  • Navigate to Triggers and create a new trigger:

    • Choose Form Submission as the trigger type.



Form Submission Trigger - Track Form Submissions in Google Tag Manager

  • Check Wait for Tags and set a delay (e.g., 2000 milliseconds) to ensure tracking before the page redirects.
  • Enable Check Validation to ensure only valid submissions are tracked.
  • Under "Enable this trigger on…", set Page Path contains / so it works across the site.



Trigger Form Submission - rack Form Submissions in Google Tag Manager

  • Click Save.

Assigning the Trigger to the GA4 Event Tag

  1. Open the GA4 event tag.
  2. In the Triggering section, select the Form Submission trigger you just created.
  3. Click Save.
  4. Enable Preview Mode in GTM and test it by submitting a form.
  5. Check the GTM Debug Panel to see if a Form Submit event appears.

    • If it appears, great! The trigger works.
    • If it doesn’t, your form likely prevents the submit event. Move on to the next method.

Method 2: Track Form Submissions via a "Thank You" Page

If your form redirects users to a confirmation page after submission, this is the easiest and most reliable tracking method.


The one mistake I see folks repeat often is they link to this thank you or add it in your sitemap.


The way this method works is it sends an event every time this page is loaded. 


So you want to double check to ensure that people don’t land on this page through other sources.

Step-by-Step: Setting Up a Thank You Page Trigger

  • In GTM, go to Triggers and create a new trigger.
  • Choose Page View as the trigger type.

Page View - Track Form Submissions in Google Tag Manager


  • Select Some Page Views and define the condition:

    • If the URL is static (e.g., https://www.example.com/thank-you), set Page Path equals /thank-you.
    • If the URL is dynamic, use Page URL contains thank-you (just make sure it’s unique).
Page View Conditions - Track Form Submissions in Google Tag Manager

  • Name the trigger something clear (e.g., "Pageview – Form Submission").
  • Click Save.

Assigning the Trigger to the GA4 Event Tag

  1. Open the GA4 event tag.
  2. In the Triggering section, select the Thank You Page trigger.
  3. Click Save.
  4. Enable Preview Mode and test by submitting the form.
  5. Verify in GA4 Debug View that the event fires only when users reach the confirmation page.

This method is foolproof as long as users can’t access the "Thank You" page without actually submitting the form.

Enhancing Tracking with Custom Parameters


If you have multiple forms on your website, tracking just a generic "form submission" event isn’t enough. 


You need to capture more details that help differentiate between each form submission, such as:

  • Form ID: A unique identifier assigned to each form, which can be extracted using GTM’s built-in variables.

  • Form Name: Some forms may not have an explicit ID, but they may have a specific name attribute that can be tracked.

  • Page URL: If each form is located on a unique page (e.g., /contact-us vs. /signup), capturing the URL will help differentiate where the submission occurred.

  • Form Type: If you have multiple lead capture forms (e.g., demo request, newsletter signup, contact form), you can categorize submissions based on the form's purpose.

Step-by-Step: Adding Custom Parameters to the GA4 Event Tag

  • Enable Form Variables: Go to Variables > Configure, and enable all Form Variables (Form ID, Form Classes, Form Target, Form Text, etc.).
  • Modify Your GA4 Event Tag:

    • Open your GA4 event tag in GTM.
    • In the Event Parameters section, click Add Row.
    • Define custom parameters for form tracking:

      • Parameter Name: form_id → Value: {{Form ID}}
      • Parameter Name: form_name → Value: {{Form Name}}
      • Parameter Name: page_path → Value: {{Page Path}}
  • Save and Test:
    • Enable Preview Mode in GTM.
    • Submit different forms on your site and check if the correct form details appear in the GTM Debug Panel.
    • If the values are being captured correctly, publish the changes.
GA4 event parameters - Track Form Submissions in Google Tag Manager

If you want to use this data in GA4 reports, you’ll need to register it as a Custom Dimension:

  • In GA4, go to Admin > Custom Definitions.

GA4 Custom Definitions - Track Form Submissions in Google Tag Manager



  • Click Create Custom Dimension.
  • Define each parameter:

    1. Name: Form ID → Event Parameter: form_id → Scope: Event
    2. Name: Form Name → Event Parameter: form_name → Scope: Event
    3. Name: Page Path → Event Parameter: page_path → Scope: Event
Define Parameter - Track Form Submissions in Google Tag Manager

  • Click Save.

By implementing this setup, you ensure that every form submission is attributed to the right form, providing clearer insights into form performance, lead quality, and conversion attribution.

PRO TIP

Form submission is just one step in the buyer’s journey.

To truly track and optimize for conversions, map the entire journey. Start from initial engagement to the final revenue event, and track each step.

By tracking and feeding all these data points back into ad networks, you help the algorithm prioritize high-intent users.

Here’s an example of how the buyer journey might look like:


Sales-led Company:


Product-led Company:


We covered how to set it up in detail in this free Google Ads course, which also walks you through full-funnel tracking and measurement strategies.

Conclusion


The right tracking method depends on how your form behaves:

  • Use the Form Submission trigger if GTM’s listener detects the event.
  • Use the Thank You page method if the form redirects after submission.
  • Use click tracking for AJAX-based forms.


Test everything thoroughly in Preview Mode to ensure you’re capturing data correctly. 


I’ve been through enough form tracking struggles to know that what works on one site may completely fail on another. 


Hopefully, this guide saves you a lot of time and frustration!


If you’re looking to see what the paid media marketing pros are up to, you should come and hang with them in the community.


The community is where you can ask the questions you wouldn’t post on LinkedIn and get insights that you wouldn’t find on Google.


You get access to:

  • Weekly experiments with real data: No guesswork, just tested strategies from real campaigns. 
  • Templates & playbooks: Proven frameworks to streamline our processes and improve efficiency. 
  • Masterminds & expert discussions: Stay ahead of strategies, tactics, and ad platform changes instead of reacting late. 
  • Benchmarking against top B2B advertisers: Learn what’s working for others running high-budget campaigns.

Come, sign up and see what the pros are talking about in the community. It takes less than a minute to sign up.

Vikash Koushik
Head of Content & Community @ AdConversion
Want to level up your B2B advertising skill set?
AdConversion was created to help B2B marketers master advertising with free courses, articles, resources, and templates created by the world best practitioners.
☝️Takes <  90 seconds
Want to level up your B2B advertising skill set?
AdConversion was created to help B2B marketers master advertising with free courses, articles, resources, and templates created by the world best practitioners.
☝️Takes <  90 seconds
Share
This is some text inside of a div block.
copy

Become a part of the best B2B Ads community ❤️