Last updated on December 4, 2022 by marketingfabrikken

How To Track Leads with Google Tag Manager Form Submit Tracking

Are you running ads on Facebook, Google AdWords, or another service? Learn how to track the sources of your WordPress form leads with Google Tag Manager form submit tracking.

How to track leads with Google Tag Manager form submit tracking

This is how I set up the event tracking on my own website as well as on my customers'. This guide assumes you already have the following:

  1. A Google Tag Manager container within your website.
  2. Analytics tracking within Tag Manager.
  3. A fully functional form on a page.

If you're using Google Analytics without Google Tag Manager, learn how to set up Google Analytics with your forms.

Did you know that you can track visitors behavior using Formidable Forms?


Referrals, time on page, clicks. All in one report. It's User flow and form abandonment tracking made easy!

Step 1: Set up triggering on all clicks

Before tracking form submissions, all clicks on your site need tracking. This means every click reacts within the variables that Google Tag Manager operates with. No worries โ€“ it's far simpler than it sounds.

  1. In your Google Tag Manager dashboard, select Triggers in the left menu.
    Google tag manager form submit triggers menu
  2. Click on the New button.
    Google tag manager form submit new click trigger
  3. In the new panel, click Choose a trigger type to begin setup. Then select All Elements below Clicks on the right sidebar. Name your trigger with something that clarifies what it is. I chose Clicks โ€“ All.
  4. Click the blue Save button in the top right corner that appears when youโ€™ve selected All Elements.

Now that you've added a click trigger, you can set up Google events (and other sorts of tracking) on the clicks happening on your site.
Google tag manager form submit all elements

Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.

Step 2: Add more variables

More variables are needed in the preview mode to track form submissions (that you will learn more about later).

Click Variables and then Configure. Add variables under Clicks and Forms then click Overview. Each added variable is autosaved.
Google tag manager form submit tracking variables

Step 3: Use preview to track clicks

One of the brilliant things about Google Tag Manager, is the ability to preview everything you're doing โ€“ including the triggering of clicks.

Click Overview in the left menu to get back to the home screen. Then click Preview.

Google tag manager form submit track clicks

Go to your website, where Google Tag Manager is installed. You should see the Google Tag Manager preview in the bottom half of your window.

In the summary to the left, you can see what happens when you click (that's the click trigger). In the following screenshot, I clicked the Submit button to get the relevant variables - followed by an instant press on my escape button. This is very important, or the site will reload itself, and the variables will disappear.

Google Tag Manager Preview Track Clicks

If you can't get it to stop refreshing, go to your form settings and set it to redirect after submit. You can always change it back when you have the variables you need) โ€“ or you can just trust me, and use the settings I use in this guide.

As you can see, there are numerous variables for the form submission. The Click Classes variable with the value "frm_button_submit" is the variable we are interested in.

Step 4: Make a trigger from the variable

Now add the variable to a trigger within Tag Manager.

  1. Click Triggers in the left side menu, then New โ†’ Choose a trigger type to begin setup.
  2. Select Click โ€“ All Elements and this time also select Some Clicks.
  3. Select Click Classes in the field to the left, type "frm_button_submit" in the field to the right, and set the middle field to contains.
    Google tag manager form submit new trigger
  4. Click Save.

Step 5: Add a tag (aka event tracking in Google Analytics)

This is where the fun starts now that all the groundwork is done. Now we just need to set up a tag and check if it works.

  1. Go to Tags in the left side menu, then click the New button.
    Google tag manager form submit new tag
  2. Click Choose a tagโ€ฆ then Universal Analytics.
  3. In Track Type select Event.
  4. Fill out Category and Action. Usually, I only fill them out as follows:
    • Category: form
    • Action: {{Page Path}} (click the plus to the right to select it). {{Page Path}} shows which page the form was submitted from. This very useful if you have the same Formidable form on multiple pages.
  5. In Google Analytics Settings, select the Analytics tag that you made before reading this guide. Remember to name your tag properly.
    Google tag manager form submit tag setup
  6. Now add the trigger created in Step 4. Whenever anyone activates the trigger (in this case clicking the submit button), the event we just made is sent to Google Analytics and gives the 'hit' to track. Click Choose a trigger to make this tag fireโ€ฆ and then select the name of your trigger.
    Google tag manager form submit trigger
  7. Click Save.

Youโ€™ve now successfully made a tag that fires an event to your Analytics whenever your form is submitted.

Step 6: Check if the tag works properly

Start by refreshing your preview so your new tag appears.
refresh Google tag manager form submit tags

Google tag manager form submit event setup

Visit your site. In the Preview screen you should see your new event:

As you can see, it's not 'fired' โ€“ this is because we haven't pressed the submit button yet.

Google tag manager form submit event

If your tag is set up correctly, you should see the tag change from 'not fired' to 'fired' when you click on the form submit button.

If you want to check that the event is transferred to your Analytics dashboard, visit your Analytics account.

Click Real-time โ†’ Events.

Open your website in another window, submit a form, and then go back to Analytics. There should be an event triggered within analytics. In the 'Event Action' column you should see the URL where the form was submitted from.
Google analytics form submit tracking

To effectuate these changes click the blue Submit button in the upper right corner of Google Tag Manager โ€“ this is very important!

Google Tag Manager form submit tracking

Now that you know how to add a click trigger and custom trigger and how to combine them with tags, the possibilities are endless. Track what you want and make scripts load when you choose.

Hope you enjoyed my guide! If you're new to Formidable Forms, be sure to check out the Formidable Blog to learn more about everything this awesome WordPress form builder plugin can do.




This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Join 400,000+ using Formidable Forms to create form-focused solutions fast. Get Formidable Forms