How to Track Online Form Submissions Using Google Analytics 4

March 20, 2024

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 need to

  • Create a property
  • Add a web data stream

Creating a property

  1. In Google Analytics, go to Admin, then select Create > Property.
How to Track Online Form Submissions Using Google Analytics 4 Image-1
  1. Enter your desired property name and details, then select Next.
Property details in Google Analytics
  1. Choose your industry category and business size, then select Next.
How to Track Online Form Submissions Using Google Analytics 4 Image-2
  1. Choose your business objectives, then select Create.
Business objectives in Google Analytics

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

Adding a data stream

  1. In Google Analytics, choose your property at the top, then go to Admin.
    Note: Skip to Step 3 if you’re continuing from “Creating a property.”
Steps to access the property admin page in Google Analytics
  1. In the left pane, go to Data collection and modification > Data streams.
The Data streams menu in Google Analytics Admin
  1. Select Web.
The Web Data Streams option in Google Analytics
  1. Enter your website’s URL and your desired stream name, then select Create stream.
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 collection and modification > 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 need to

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

Setting up variables

  1. In GTM, 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 GTM, 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. Open Trigger Configuration, then search and select Form Submission.
How to Track Online Form Submissions Using Google Analytics 4 Image-3
  1. Turn on Check Validation and set the enable-trigger condition to Page Path contains /.
Trigger's check validation in GTM
  1. 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 Google Tag 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. Open Tag Configuration, then search and select Google Tag.
Steps to add a Google Tag configuration in GTM
  1. Provide your Measurement ID under Tag ID.
  2. Under Configuration settings, add a send_page_view parameter and set its value to true.
  3. Enter your desired tag name at the top.
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, open Tag Configuration, then search and select Google Analytics: GA4 Event.
Steps to add a GA4 Event tag config in GTM
  1. In Tag Configuration, provide your Measurement ID, then enter generate_lead under Event Name.
The GA4 Event's tag configuration and event name
  1. Scroll down 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 you’re 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 the provided 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 4 Image-4
  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.

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:

  • Svata - Profile picture
  • McLorg - Profile picture
  • dhemy - Profile picture
  • Nchima Lestious - Profile picture
  • Franco Colomba - Profile picture
  • LVDM - Profile picture
  • Tye Hillam - Profile picture
  • Tye Hillam - Profile picture
  • Laura Daniel - Profile picture
  • Roberto Cucco - Profile picture
  • Brian Galvan - Profile picture
  • Maureen Jouhet - Profile picture
  • KixCare - Profile picture
  • Ellen Rudolph - Profile picture
  • LGT_Digital - Profile picture