4 Ways To Track Form Submissions In Google Analytics Using Google Tag Manager

track form submissions in google analytics

Jump To:

Proper tracking and tagging is one of the most important things you can do to get actionable results out of your digital marketing campaigns. Over the years, we’ve seen a lot of less-than-ideal conversion tracking setups; from lead leaks, to incorrect or out-of-date settings, to no tracking at all. Without these important signals, digital marketing campaigns are essentially flying blind. That’s why one of the first things we do when we work with new clients is to track form submissions in Google Analytics and ensure that correctly configured tracking tags are in place so there are no lead leaks. 

Luckily, Google Tag Manager (GTM) makes tracking much easier and with the introduction of Google Analytics 4, some events like outbound link clicks, are automatically tracked out the gate. However, there are other events that require configuration (i.e contact clicks, form submissions, etc) that you’ll likely find helpful to track as well. In this article, we’ll focus on 4 ways to track form submissions in Google Analytics with GTM and share which one we believe is the best way to track forms and why. [If you are looking for professional assistance, check out our Google Analytics setup service for more information.]

4 Ways to Track Form Submissions

In a nutshell, the four most common ways to track form submissions in Google Analytics with GTM are:

At the end of the day, the question we are trying to answer is:

“How many form submissions actually happened?”

Here we will outline the pros and cons of each of these so you can determine what is most appropriate for your situation. If you aren’t sure or need guidance along the way, feel free to contact our tracking experts for a personalized measurement strategy.

Submit Button Click Tracking

Click tracking is one of the easiest ways to track important events on your website. Firing a click tracking event each time a form’s Submit button is clicked on is one way to estimate the number of times that form was submitted. Submit Button click tracking is so common because it is easy to set up, especially if you are using Google Tag Manager (GTM). The built-in click listeners and variables in GTM make it very easy to track clicks without any coding. Here’s how to set it up in your Google Tag Manger account:

  1. Enable all of the built-in click variables
  2. Create a Click Trigger
  3. Set the Click Trigger to fire when Click Text equals Submit (or whatever your button text/conditions are for your website)

 

Enable all of GTM’s Click Variables

 

Example of tracking clicks on a button with the text “submit”

Another benefit of click tracking is it can capture intent. When someone clicks submit on a form, they are trying to send the information to the website. Imagine your favorite small business is raffling off its top-selling product and asks its website users to fill out a form by a certain date to enter the raffle. If “User A” fills out a form and clicks the Submit button once, and “User B” clicks it 2 or 3 times because they want to make sure they get their name in before it’s too late, which user seems to be more excited? That said, while someone clicking a Submit button multiple times may have a lot of intent, it could also have been a mistake, and at the end of the day, they are still only one customer or lead. 

Another danger with click tracking is that counting every click can lead to overinflating your conversion numbers. In the above example, “User A” might have accidentally clicked the Submit button while scrolling on a mobile device, and “User B” may have clicked several times out of habit or frustration. Another scenario that simply tracking the number of times someone clicks on a button with the word “Submit” doesn’t tell you is if the form was actually completed or submitted to your database successfully. There could have been errors when filling out the form or the submission could have timed out or numerous other reasons why the form was invalid.

If you are only tracking clicks as a conversion to measure the number of form submissions, it is possible that you’ll receive multiple conversions (thanks to multiple clicks), but only one true lead or form submission. This in turn means that your PPC advertising could be optimizing towards people who may be click-happy, instead of real leads.

Here are the Pros and Cons of Tracking Submit Button Clicks as Form Submission Conversions

Pros Cons
Captures intent Can inflate numbers by counting double clicks or accidental clicks
Easy to setup with GTM’s built-in click event listeners Can inflate numbers by counting invalid form submissions
  Doesn’t track “Open in new tab” clicks
  Not all clicks lead to a conversion

Therefore we must ask, “if tracking clicks on a Submit button can lead to overinflated conversions, how can we tell when someone has successfully filled out a form?” This brings us to our next common way of tracking form submissions in Google Analytics.

Thank You Page Visits

One way to track success form submissions is to count the number of times that a user lands on a Thank You page. After a form is completed, some websites choose to direct that user to a Thank You page. The Thank You page may say “thank you for filling out our form.” It can also be used to give additional information, confirm the values that were submitted on a form, or let the user know what to expect next. 

One of the best reasons to use Thank You page visits as a conversion is that they were extremely easy to set up as a destination goal in Universal Analytics (GA3). Now, no matter which version of Google Analytics you’re using, you should have a page view tag tracking all pages on your website. This means you’ll be able to easily see the number of times someone has visited your thank you page in the standard reports. 

If you’d like to optimize your digital marketing toward these page visits, you can fire a tag via GTM whenever a specific page is visited (i.e. Page Path equals /thank-you) or create a new event from within the Google Analytics 4 interface.

 

To create a specific thank you page event in GA4 so you can mark it as a conversion, navigate to the Configure section, click Events, then click the blue Create Event button and enter your conditions.

The good news is that once the Thank You page is loaded and the page view tag fires, you will be able to confirm that a successful form submission happened.

Assuming you’ve de-indexed the Thank You page and haven’t linked to it from anywhere other than the form, is it safe to assume that the number of page views equals the number of successful form submissions?

Not quite… Unfortunately, counting Thank You page visits can also lead to inflated conversion numbers if a user visits that same Thank You page multiple times, perhaps using the back and forward buttons in their browser or visiting the page from their page history. In this instance, Thank You page visit tracking would then count more than one conversion for the same lead. 

Additionally, as with any page visit, the page view tracking tag must fire on that page in order to register a visit on that Thank You page. This is especially troublesome on slow sites where it takes several seconds to load a page. If a user submits a form and then leaves the page or closes the browser tab before the pageview tag has had a chance to fire, you will miss out on counting that conversion and see deflated conversion numbers.

Here are the Pros and Cons of Tracking Thank You Page Visits as Form Submission Conversions

Pros Cons
Actual confirmation of form submission Users may leave before the page loads leading to deflated numbers
Easy to setup Universal Analytics destination goals without any coding Depends on when the pageview tag loads in the HTML code
  Not good on slow sites
  Revisiting the Thank You page can lead to overinflated numbers
  Not all forms have Thank You pages

For these reasons, many website owners choose not to track thank you page visits as their form submission tracking option. This brings us to our 3rd way to track form submissions in Google Analytics.

Success Message Visibility

Instead of sending form submitters to a brand new Thank You page, some forms allow you to display a success message in place of the submitted form after it’s filled out. Displaying a success message is beneficial because it is usually faster than loading a new page. It also occurs immediately after a form submission and can only be seen after a form was submitted successfully and there are no errors in the form validation.

It is also easy to implement with Google Tag Manager because of the Element Visibility trigger.

 

Fires trigger when an element with a class of “success-message” appears on the user’s visible screen.

The downside however is that the Element Visibility trigger is a little more complicated to set up. For example, you must be familiar with either finding the success message HTML element’s ID or determining a unique CSS selector that can be used to fire the trigger. Additionally, that element must be a certain % visible on the screen (GTM defaults to 50%) and could potentially fire more than once if “Every time an element appears on screen” is chosen. 

 

Recommended Element Visibility settings for success message tracking using Google Tag Manager.

Pro Tip: If you are going to use this trigger type, we usually recommend firing the Element Visibility trigger once per element and setting the Minimum Percent Visible to 10%. Regardless and as always, be sure to test thoroughly before publishing your GTM changes.

Here are the Pros and Cons of Tracking Success Message Visibility as Form Submission Conversions

Pros Cons
Actual confirmation of form submission Forms can usually only be submitted once per page load
Don’t have to wait for a new page to load Not all forms have this option
Happens immediately after a form submission Element Visibility Trigger has complex configuration settings
  Requires inspecting the page source for success message element id or a CSS selector
  Must be visible on the screen. The success message element may not be seen by all users if loaded too far down the page.

Therefore, if click tracking can lead to over inflation, and Thank You page visits or success messages can lead to inflated or deflated numbers, what is the best option for tracking conversions? Glad you asked. I submit to you (pardon the pun), Submit event tracking.

Submission Event Tracking

Event tracking at the exact time of successful form submission is our preferred method of tracking form submissions in Google Analytics. This is because we believe it is the right balance of capturing intent, while also triggering tracking tags to fire at the right moment. The downside is that setting them up correctly takes a little more familiarity with how browsers work and the JavaScript and HTML coding languages.

Without boring you with too much detail, a generic Event is a JavaScript snippet that signals that something (other than a page view) has happened in the browser. Modern web browsers, like Chrome, Firefox, and Safari, have built-in event listeners that can be used to “listen” for these special actions. For example, click tracking uses the “onclick” event listener, whereas we can use the “onsubmit” listener from the form element to trigger a conversion tag only on the first successful form submissions.

Submission event tracking is made even easier by Google Tag Manager’s built-in form listeners and its native form submission event that makes tracking most forms easy.

  1. Enable all of the built-in form variables
  2. Create a Form Submission trigger
  3. Set trigger to fire when Form ID equals your form id (you may need to inspect the form in the page source to get the form id)

 

Enable all of GTM’s Form Variables

 

Example of tracking form submissions when the form has an id of “contact-us”.

Pro Tip: Depending on how your form was created and added to your site, Google Tag Manager’s default Form Submission trigger may not work. Stay tuned for an article on how to track specific form types, otherwise, feel free to contact us if you have questions about form tracking.

The major benefit of using this type of form tracking is that you’ll fire an event when all form validation has passed and at the actual time of submissions. You don’t have to worry about double counting or missing conversions because the Form Submission trigger is fired when the form sends a submit() to the server successfully. 

Here are the Pros and Cons of Tracking Form Submission Events as Conversions:

Pros Cons
Still captures intent Moderate technical ability needed
Actual confirmation of form submission or purchase Requires inspecting page source for form ID
Prevents overinflation due to multiple button clicks GTM’s form submission trigger doesn’t work for all forms
Occurs after the button click, but before a thank you page load  
Supports other form types that don’t use thank you page  
Works on fast sites and slow sites  

Wrapping Up

Now that we’ve gone through the pros and cons of 4 different ways to track form submissions in Google Analytics using Google Tag Manager, we hope it makes it easier to understand whether button clicks, Thank You page visits, success messages, or submission events are right for your unique tracking scenario. While each form tracking solution has its advantages and disadvantages, we’ve found tracking form submissions in Google Analytics using Form Submission Event tracking to be the most reliable in terms of not missing or double counting the number of leads.

Just as two humans are unique, so are businesses, websites, and their measurement strategies. If you have any questions about Google Tag Manager or are interested in getting help with your website tracking and tagging, please don’t hesitate to reach out to us at any time. We’re here to help!

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay Up-to-date

Find this helpful? Sign up for our newsletter to get this delivered right to your inbox. Plus, get digital marketing news, expert insights, updates, and more.