How to Track Online Form Submissions Using Google Analytics

Last Update: 

Jotform provides Form Analytics to analyze data, improve responses, learn from customer behavior, and increase your conversion rate. If you need further analytics for your forms, you can use Google Analytics 4 (GA4) and Google Tag Manager (GTM).

A note before starting, the following setup only works on forms added to a website using the form’s source code. To learn more, see How to Get the Full Source Code of Your Form.

Form Tracking With Google Analytics 4

Google Analytics is a service that allows you to track events on your form. The following shows how to use Google Analytics on your form using a new property and data stream in an existing GA4 admin account but you can use your existing ones. See How to Set Up Analytics to get started with Google Analytics 4.

Assuming you already have a GA4 account, you’d need to

  • Create a property
  • Add a web data stream

Creating a property

  1. In Admin, select Create Property in the Property column.
Arrows pointing to the Admin menu and Create Property button in Google Analytics
  1. Next, enter your desired property name and details.
  2. Scroll down to the bottom and select Next.
Highlights to the Property details fieldset and Next button in Google Analytics
  1. Choose your industry category and business size, then select Create at the bottom.
An arrow pointing to the Create button in Google Analytics' property creation wizard

Once your property is ready, continue by adding a web data stream to it.

Adding a data stream

  1. In Admin, choose your property in the Property column, then go to Data Streams.
    Note: Skip to the next step if you’re continuing from “Creating a property.”
Highlights to access Data Streams in Google Analytics
  1. In Data Streams, select the Web data stream to add it to your property.
Highlights to create a web data stream in Google Analytics
  1. In the Set up data stream dialog, enter your website’s URL and your desired stream name.
  2. Select Create stream at the bottom.
Arrows pointing to Website URL, Stream Name, and Create stream in Google Analytics' Set up data stream dialog
  1. Skip the tag installation for now and take note of the Measurement ID.
An arrow pointing to the measurement ID in Google Analytics

If you forgot your Measurement ID, you can get it by viewing your data stream in Admin > Data Streams. Once your data stream is ready, continue by setting up your Goole Tag Manager.

Setting Up Google Tag Manager

Assuming you already have your GTM account and GA4 Measurement ID, you’d need to

  • Set up variables
  • Create a trigger
  • Set up the tag

Setting up variables

  1. In your GTM account, go to Variables on the left, then select Configure in the upper-right corner.
Arrow guides to configure variables in GTM
  1. In Configure Built-In Variables, scroll down to Forms and turn on all form variables.
Form variables in GTM
  1. Close Configure Built-In Variables once you’re done.

Now that the form variables are ready, the next step is to create a trigger.

Creating a trigger

  1. In your GTM account, go to Triggers on the left, then select New in the upper-right corner.
Highlights to create a new trigger in Google Tag Manager
  1. Next, open Trigger Configuration and create a Form Submission trigger type.
The Form Submission trigger type in GTM
  1. Turn on Check Validation and set the enable-trigger condition to Page Path contains /.
Trigger's check validation in GTM
  1. Now, select Some Forms at the bottom and set the fire-trigger condition to Form ID equals {form_id} where form_id is your Jotform form’s ID.
The Some Form trigger fire condition in GTM
Guides to get the form's ID in Form Builder

Note: Form ID is the set of numbers found at the end of your form URL.

  1. Enter your desired trigger name at the top, then select Save in the upper-right corner.
Arrows pointing to the trigger name and Save button in GTM's trigger configuration

Now that the trigger is ready, the next step is to set up the GA4 configuration and event tags.

Setting up tags

To set up GA4 Configuration

  1. In your GTM account, go to Tags on the left, then select New in the upper-right corner.
Arrow guides to create a new tag in Google Tag Manager
Arrow guides to create a new tag in Google Tag Manager
  1. Next, open Tag Configuration and create a Google Analytics: GA4 Configuration tag.
Arrow guides to create a G4 configuration in GTM
  1. Enter your desired tag name at the top, then provide your Measurement ID in Tag Configuration.
The tag name and Measurement ID in Tag Configuration
  1. Select Save in the upper-right corner, then Save Tag when prompted.
Saving the GA4 configuration

To set up GA4 Event

  1. Add a new tag and create a Google Analytics: GA4 Event tag.
Arrow guides to create a G4 event in tag configuration
  1. Set up the following in Tag Configuration:
The GA4 Event's tag configuration and event name
  • Configuration Tag: {your previously created GA4 Configuration}
  • Event Name: generate_lead
  1. Scroll down to the bottom and open Triggering.
  2. Select your Form Submission trigger.
Selecting a Form Submission trigger in GTM's tag configuration
  1. Enter your desired tag name at the top, then select Save in the upper-right corner.
Saving a GA4 Event configuration in GTM

Once that’s done, continue by embedding your form and installing GTM on your website.

Adding Your Form and GTM to Your Website

To put it all together, you need to install GTM into your website where your form is embedded.

To embed your form

  1. In the Form Builder, go to Publish > Embed > Source code.
Steps to access the form's source code in Form Builder
  1. Copy your form’s full source code and embed it into your website.
    See How to Get the Full Source Code of Your Form for more information.

To install Google Tag Manager

  1. In your GTM account, at the top, choose your container to install.
  2. Add the codes to your website’s head and body tags as mentioned in the dialog.
The Install Google Tag Manager dialog

If you only need to monitor your form, you can choose to add the codes only to the pages where your form appears.

Once the form and tag are set, the next step is to check and save your configurations.

Testing Your Setup

To see if your setup works in GTM

  1. In your GTM account, select Preview in the upper-right corner.
The Preview button in GTM
  1. On the next page, enter the URL where your form and tag are installed, then select Continue.
The tag assistant in GTM

Your form should open in a new tab or window. If Tag Assistant is having trouble connecting to your site, try installing the Tag Assistant Companion browser extension.

  1. Once Tag Assistant is connected, send a test entry to your form.
  2. Switch back to Tag Assistant and check the Summary pane on the left.
The Form Submit log in GTM's Tag Assistant

The Form Submit entry is a good indication that your tag is working.

  1. Once you’re done, go to your GTM account, select Submit in the upper-right corner, and publish your setup to apply all the changes.
The Submit button in GTM

To see if your setup works in GA4

  1. In your GA4 account, at the top, search and select DebugView.
How to Track Online Form Submissions Using Google Analytics Image-1
  1. Open Tag Assistant in a new tab and connect your site where your form and tag are installed.
  2. Send a test entry on your form.
  3. Check the logs in DebugView.
Activity logs in GA4's DebugView

For more information, see how to monitor events in DebugView.

Was this guide helpful?
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:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comments:

  • Brian Galvan - Profile picture
  • Maureen Jouhet - Profile picture
  • KixCare - Profile picture
  • Ellen Rudolph - Profile picture
  • LGT_Digital - Profile picture