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
- In Google Analytics, go to Admin, then select Create > Property.
![How to Track Online Form Submissions Using Google Analytics 4 Image-1](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-create-property-min.png)
- Enter your desired property name and details, then select Next.
![Property details in Google Analytics](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-create-property-details-min.png)
- Choose your industry category and business size, then select Next.
![How to Track Online Form Submissions Using Google Analytics 4 Image-2](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-create-property-business-details-min.png)
- Choose your business objectives, then select Create.
![Business objectives in Google Analytics](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-create-property-business-objective-min.png)
Once your property is ready, continue by adding a web data stream to it.
Adding a data stream
- 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](https://www.jotform.com/blog/wp-content/uploads/2020/11/analytics-property-admin-min.png)
- In the left pane, go to Data collection and modification > Data streams.
![The Data streams menu in Google Analytics Admin](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-admin-data-streams-min-1.png)
- Select Web.
![The Web Data Streams option in Google Analytics](https://www.jotform.com/blog/wp-content/uploads/2024/03/analytics-admin-data-streams-web-min.png)
- 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](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-analytics-set-up-data-stream-min.png)
- Skip the tag installation for now and take note of the Measurement ID.
![An arrow pointing to the measurement ID in Google Analytics](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-analytics-measurement-id-min.png)
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
- In GTM, go to Variables on the left, then select Configure in the upper-right corner.
![Arrow guides to configure variables in GTM](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-variables-configure-min.png)
- In Configure Built-In Variables, scroll down to Forms and turn on all form variables.
![Form variables in GTM](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-form-variables-min.png)
- 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
- 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](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-new-trigger-min.png)
- Open Trigger Configuration, then search and select Form Submission.
![How to Track Online Form Submissions Using Google Analytics 4 Image-3](https://www.jotform.com/blog/wp-content/uploads/2024/03/gtm-trigger-config-form-submission-min-1.png)
- Turn on Check Validation and set the enable-trigger condition to
Page Path contains /
.
![Trigger's check validation in GTM](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-form-submission-trigger-condition-min.png)
- 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](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-form-submission-trigger-fire-condition-min.png)
![Guides to get the form's ID in Form Builder](https://www.jotform.com/blog/wp-content/uploads/2021/08/form-builder-id-url-min.png)
Note: Form ID is the set of numbers found at the end of your form URL.
- 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](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-save-trigger-min.png)
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
- 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](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-tags-new-min.png)
![Arrow guides to create a new tag in Google Tag Manager](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-tags-new-min.png)
- Open Tag Configuration, then search and select Google Tag.
![Steps to add a Google Tag configuration in GTM](https://www.jotform.com/blog/wp-content/uploads/2024/03/gtm-tag-config-google-min.png)
- Provide your Measurement ID under Tag ID.
- Under Configuration settings, add a send_page_view parameter and set its value to true.
- Enter your desired tag name at the top.
![The tag name and Measurement ID in Tag Configuration](https://www.jotform.com/blog/wp-content/uploads/2024/02/google-tag-my-configuration-min.png)
- Select Save in the upper-right corner, then Save Tag when prompted.
![Saving the GA4 configuration](https://www.jotform.com/blog/wp-content/uploads/2024/02/google-tag-my-configuration-save-min.png)
To set up GA4 Event
- 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](https://www.jotform.com/blog/wp-content/uploads/2024/03/gtm-tag-config-ga4-event-min.png)
- In Tag Configuration, provide your Measurement ID, then enter generate_lead under Event Name.
![The GA4 Event's tag configuration and event name](https://www.jotform.com/blog/wp-content/uploads/2024/02/google-tag-g4-event-config-min.png)
- Scroll down and open Triggering.
- Select your Form Submission trigger.
![Selecting a Form Submission trigger in GTM's tag configuration](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-form-trigger-min.png)
- Enter your desired tag name at the top, then select Save in the upper-right corner.
![Saving a GA4 Event configuration in GTM](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-save-ga4-event-min.png)
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
- In the Form Builder, go to Publish > Embed > Source code.
![Steps to access the form's source code in Form Builder](https://www.jotform.com/blog/wp-content/uploads/2024/03/form-builder-embed-source-code-min.png)
- 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
- In your GTM account, at the top, choose your container to install.
- Add the codes to your website’s head and body tags as mentioned in the dialog.
![The Install Google Tag Manager dialog](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-codes-min.png)
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
- In your GTM account, select Preview in the upper-right corner.
![The Preview button in GTM](https://www.jotform.com/blog/wp-content/uploads/2023/05/google-tag-manager-preview-button-min.png)
- On the next page, enter the URL where your form and tag are installed, then select Continue.
![The tag assistant in GTM](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-tag-manager-connect-tag-assistant.png)
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.
- Once Tag Assistant is connected, send a test entry to your form.
- Switch back to Tag Assistant and check the Summary pane on the left.
![The Form Submit log in GTM's Tag Assistant](https://www.jotform.com/blog/wp-content/uploads/2023/05/google-tag-manager-connected-assistant.png)
The Form Submit entry is a good indication that your tag is working.
- 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](https://www.jotform.com/blog/wp-content/uploads/2023/05/google-tag-manager-submit-button.png)
To see if your setup works in GA4
- In your GA4 account, at the top, search and select DebugView.
![How to Track Online Form Submissions Using Google Analytics 4 Image-4](https://www.jotform.com/blog/wp-content/uploads/2023/05/google-analytics-search-debug-view.png)
- Open Tag Assistant in a new tab and connect your site where your form and tag are installed.
- Send a test entry on your form.
- Check the logs in DebugView.
![Activity logs in GA4's DebugView](https://www.jotform.com/blog/wp-content/uploads/2021/08/google-analytics-debug-view.png)
For more information, see how to monitor events in DebugView.
Send Comment:
13 Comments:
60 days ago
Hi, I am stuck at the testing part. When I test it, it says connected, but after filling out the form, there is no Form Submit, the tag stays under "Not Fired"
63 days ago
I can't see the admin page
156 days ago
Heads up! The "Configuration Tag" drop-down menu on the GA4 event tag template isn't there anymore. From now on, every GA4 event tag will need the Measurement ID of the GA4 web data stream receiving the events. It might be a good idea to update this guide, as the current steps won't work in that section.
156 days ago
Jotform, GTM functionality for all types of forms needs to be a priority.
226 days ago
Will this work if the form is embedded on the website using an iFrame?
226 days ago
Doesn't work with Google Analytics 4 (GA4) and the old Google Analytics is no longer available.
In GA4, there is no option "Google Analytics: GA4 Configuration tag" per the instructions on this page.
The closest thing in GA4 is a "Google Tag". However, these instructions don't work with that setup.
The instructions need updating from the step "To set up GA4 Event", number 2 onwards.
346 days ago
Trying to set up Google Ads tracking but this doesn't seem to work with Google Ads. Is there another option? Thanks!
More than a year ago
Does it work only with the source code of the form embedded in the page? It seems that it doesn't work with the form embedded with iframe
More than a year ago
GA4????
More than a year ago
Will this also work on GA4? The line says your Universal Tracking ID.
More than a year ago
Following this setup would allow me to track what steps users abandon the form?
More than a year ago
I've added the google analytics ID, but it seems like for Google Tag Manager instructions we have to be using a custom Thank You page url for it to work? We are currently using the jotform thank you page.
More than a year ago
How can we do the above tracking with Google Analytics 4