JotForm User Guide / Advanced Features /

How to Track Online Form Submissions Using Google Analytics

How to Track Online Form Submissions Using Google Analytics

With today’s modern technology, web forms are becoming more essential for businesses. They are one of the tools a business can use to determine how to improve performance, increase sales, and grow the business as a whole. Without such tools, tracking customer feedback, getting survey responses, and acquiring customer information isn’t possible, and your business runs the risk of losing potential customers.

The ability to track submissions is one of the biggest benefits of online forms. Tracking allows you to get more leads, target people who didn’t complete your form, and upsell existing customers — all of which will greatly increase your conversion rates and result in a better return on investment.

At JotForm, we provide Form Analytics to analyze data, improve responses, learn from customer behavior, and increase your conversion rate. If you need further analytics for your forms, try using Google Tag Manager and Google Analytics. 

Let’s start with Google Tag Manager. First, make sure you’ve set up the following:

1. A Google Tag Manager account and tracking codes
2. Your form
3. The data you want to track — in this case, the entries in your form fields. You can also track the form name or the submission ID. `
4. Your custom thank-you URL, which is required because you need to append the parameters in the URL for tracking purposes

Let’s say we have the following form.





And you want to track the Name, Location, Source, and the Submission ID

Step 1: Note the Unique Name for each field that you want to track. The following guide will help you get the Unique Name value:




The Unique Names of the fields from the sample form are:

{name}
{location}
{whereDid}
{id}

The Submission ID is always {id}

Step 2: Set up your custom thank-you URL. 

Get your GTM codes and add them to the custom thank-you. Put the first part of the code in the header section and the second part in the body. 

The custom HTML page will look like this



For CMS based websites and website builders, we recommend asking your developer or contacting your hosting provider for assistance.


2. Set up the URL with the required parameters. Assuming that we have the following custom thank-you URL — https://shots.jotform.com/welvin/html/thanks.html — the full URL with the parameters would be


Place the question mark (?) after the actual thank you URL, then the Unique Name, followed by the equal sign (=), then the Unique Name again enclosed with the brackets. Always separate each piece of data you want to track with an ampersand (&).



Related guides:


Step 3: Create and set up your form field variables in Google Tag Manager.

1. In GTM, click Variables.
2.Click the New button under User-Defined Variables.



3. Name the variable based on the field you want to track. If you want to track the Name field, you can use “Client Name” as the variable name. Choose the URL option from the list.



4. Choose Query from the Component Type dropdown.
5. Enter the Unique Name (from the form field properties) under Query Key. You can always change this, but for better management of the fields, we recommend using the Unique Name.
6. Click the Save button.



Repeat the same steps for all the fields you want to track. The final User-Defined Variables will be as follows:



Step 4: In GTM, go to Triggers. Click the New button to add a new trigger.



Choose Page View - Window Loaded or Page View - Page View for the Trigger Type. Select Some Window Loaded Events in the next option, and make sure to filter by Page URL that contains any term from your custom thank-you URL. In the example below, thanks.html is entered as the value.



Don’t forget to save. 

Step 5: In GTM, go to the Tags option, and add a new tag. Choose Google Analytics: Universal Analytics from the list.



Set up your tag configuration this way:



Category can be your form name.
Action can be static text, but I’ve chosen the Submission ID so that the data will always be unique in Google Analytics.
Label can also be static text, but I’ve chosen the Client Name for the same reason, so the data will always be unique. 
Set Non-Interactive Hit to True

Under Google Analytics Settings, choose New Variable



Enter your Analytics Tracking ID, and save.





This particular step is very important for sending tracked data to Google Analytics. There is a new version of Google Analytics, but this tutorial covers tracking form submissions using the Universal Google Tracking ID.


Last, under Triggering, choose the trigger that you created in Step 4.



Don’t forget to save.

You can use the GTM Assistant to ensure everything is working correctly. Click the Preview button to do so.



You’ll be redirected to the Tag Assistant page (https://tagassistant.google.com/). Enter the URL of your custom thank-you URL with the parameters and some test values.

Example: 




Click the Start button to proceed. This will open a popup window with the provided URL. Minimize that window and go back to the Tag Assistant. Click the Continue button.



Go to the Variables tab of the Tag Assistant page to view the data. It will display the values of the fields. If you don’t see the data, or if it displays as “undefined,” that means you’ve made a mistake.



If everything is set correctly, you should see this data in the Events section of your Google Analytics account.




Let’s move on to using the Google Analytics widget

In the JotForm Form Builder, go to the Widgets tab, search for Google Analytics, and add it to your form. The placement of the widget isn’t important. You can add it to the bottom or top of your form. Once you’ve added it, enter your Google Analytics Tracking ID. Click the Update Widget button to save your changes.



And you’re done. 

While we’ve mentioned tracking form submissions, the Google Analytics widget does not track the submission itself. The widget will only track activities on your form, including the current number of people viewing your form and the total number of sessions on your form. 

You can find this data through the Realtime monitoring in your Analytics dashboard.



To view the total number of previous submissions, go to the Overview of the Behavior/Audience tab. JotForm will be one of the referrals that includes the number of users/sessions.



That sums up everything you need to know to track your form submissions with Google Analytics. Feel free to contact the JotForm Support Team if you have any questions, comments, or suggestions regarding this guide. 

Contact Support:
Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:
Contact JotForm Support: https://www.jotform.com/contact/

Send Comment