GA4 Form Tracking via Google Tag Manager

Last Updated: February 3, 2023

How to set up GA4 form tracking via Google Tag Manager?

Follow the steps below:

Step-1: Navigate to your GA4 Property.

Step-2: Click on the ‘Admin’ link in the left-hand side reporting menu:

ga4 admin 3

Step-3: Click on ‘Data Streams’ under the ‘Property’ column:

data streams ga4 2

Step-4: Click on the web data stream for which you want to set up form tracking in GA4:

Click on the web data stream

Step-5: Click on the gear button under ‘Enhanced measurement’ to access the settings menu:

Enhanced measurement settings ga4 1

Step-6: Make sure that the toggle button next to ‘Form Interactions’ is turned off so that it does not interfere with our form tracking:

Form Interactions ga4 turned off 1

Through the GA4 form interactions tracking feature, you can automatically track form submissions in your GA4 property without any additional code or tagging.

However,

At the time of publishing this article, the accuracy of the GA4 form interactions tracking via enhanced measurement is completely way off. 

GA4 track form submissions even when a user does not submit the form. In the case of our website, GA4 was reporting thousands of form submissions a day which is not possible.

However, this situation is unlikely to remain the same in the near future. But for now, we keep the ‘Form Interactions’ setting disabled. 

Step-7: Navigate to the form embedded on your website that you want to track. Fill out the form and submit it to see how it works. 

Step-8: Ensure that a user sees the ‘thank you’ page but only when the form is successfully completed. If that is not the case, then ask your web developer to fix this issue.

Let us suppose on the successful form submission, you are not redirected to a ‘thank you’ page.

Instead, you see a confirmation message on the same page where you earlier saw the form. If that is the case, then most likely, your form is built with Ajax. 

By default, GA4 and GTM can not track forms built with Ajax. 

You would need to create Ajax listener (a bunch of JavaScript code) and then use it in a custom HTML tag of GTM, which is quite technical in nature. 

Most form builders (like ‘Gravity Forms’) provide a feature to enable or disable Ajax submission easily:

enable or disable Ajax submission gravity forms 1

If this feature is unavailable to you, ask your web developer to convert the Ajax form into a standard form that redirects a user to the ‘thank you’ page on successful form submission.

Step-9: Note down the URL of the ‘thank you’ page. You will need this URL later. 

We will now create a new tag that fires the ‘generate_lead’ event on the ‘thank you’ page.

We are using ‘generate_lead’ event because this is the GA4 recommended event for form submission.

Step-10: Login to your Google Tag Manager account and then click on the ‘Triggers’ menu:

triggers menu gtm

Step-11: Click on the ‘New’ button to create a new trigger:

create a new trigger

Step-12: Name your trigger ‘Form Submission Thank You Page’:

Form Submission Thank You Page

Step-13: Click on the button ‘Choose a trigger type to begin setup…’:

Choose a trigger type to begin setup 1

Step-14: Click on ‘Page View’:

pageview trigger type

Step-15: Click on the radio button ’Some Page Views’:

Some Page Views 1

Step-16: Select ‘Page URL’ and ‘Starts with’ from the drop-down menus:

drop down menus 1

Step-17: Enter the URL of the ‘thank you’ page you noted earlier and then click on the ‘Save’ button:

URL of the ‘thank you page

You should now see your new trigger listed under the ‘Triggers’ section:

new trigger listed under the ‘Triggers section

Step-18: Click on the ‘Tags’ menu:

tags menu gtm

Step-19: Click on the ‘New’ button to create a new tag:

create a new tag

Step-20: Name your new tag, select ‘Google Analytics: GA4 Event’ as the tag type, select your GA4 configuration tag (from the drop-down menu) and set the event name to ‘generate_lead’:

Name your new tag 1

Step-21: Scroll down and then click on ‘Choose a trigger to make this tag fire…’ button:

Choose a trigger to make this tag fire

Step-22: Click on the trigger ‘Form Submission Thank you page’:

Form Submission Thank you page trigger

Step-23: Click on the ‘Save’ button to save your new tag:

save your new tag

How to test GA4 Form Tracking?

Now we will test whether the ‘generate_lead’ event fire on successful form submission.

Follow the steps below:

Step-1: Click on the ‘Preview’ button in your GTM account:

Preview gtm container

You should now be automatically redirected to the tag assistant window. 

Step-2: Enter the URL of the web page which contains the form you want to track, and then click on the ‘connect’ button:

tag assistant window

You should now be automatically redirected to the web page which contains the form you want to track:

automatically redirected to the web page

Step-3: Fill out the form and then click on the ‘Submit’ button.

You should now be able to see the ‘thank you’ page.

Step-4: Navigate back to the tag assistant window and then click on the ‘continue’ button:

Navigate back to the tag assistant window

You should now be able to see your tag ‘Send generate_lead event to GA4 Test property’ fired under the ‘Tags Fired’ section:

tag ‘Send generate lead event to GA4 Test property fired

Step-5: Navigate to the ‘Debug View’ report in your GA4 admin:

Navigate to the ‘Debug View report in your GA4 admin

Step-6: Set your debug device to ‘Google’ and look for the GA4 eventgenerate_lead’:

Set your debug device to ‘Google

Step-7: Click on the ‘generate_lead’ event and then click on the ‘page_location’ drop-down menu:

Click on the ‘generate lead event

You should now be able to see the URL of your ‘thank you’ page. 

This testing confirms that the ‘generate_lead’ event is firing on the ‘thank you’ page (aka on form submission).

Step-8: Navigate back to the tag assistant window of your GTM account and then click on the ‘cross’ button at the top left:

click on the ‘cross button at the top left

Step-9: Click on the ‘Stop debugging’ button:

Stop debugging

Step-10: Navigate back to your GTM account and then click on the ‘Submit’ button:

submit button gtm

Step-11: Give your version a name and then click on the ‘Publish’ button to publish your GTM container:

publish your GTM container

How to see the form tracking data in GA4?

There are two ways you can see the form tracking data in GA4:

  1. Through the ‘Events’report
  2. By creating an exploration report.

Finding form interactions data through the ‘Events’ report

Follow the steps below:

Step-1: Once you have set up form tracking in your GA4 property, wait for at least 24 hrs to gather form tracking data in your reports.

Step-2: Navigate to the ‘Events’ report (under ‘admin’):

Navigate to the ‘Events report under admin

 You should now be able to see the ‘generate_lead’ event listed under ‘Existing events’:

see the ‘generate lead event listed under ‘Existing events

Step-3: Mark the ‘generate_lead’ event as a conversion by turning on the toggle button next to it:

Mark the ‘generate lead event as a conversion

Finding form tracking data by creating an exploration report

Follow the steps below:

Step-1: Click on the ‘Explore’ link from the left-hand side navigation bar in your GA4 property:

Explore report ga4

Step-2: Click on the ‘Blankexploration report template:

Blank exploration report template

Step-3: Name your report ‘Form Tracking’:

Name your report ‘Form Tracking

Step-4: Set the date range to the last 30 days:

Set the date range to the last 30 days

Step-5: Click on the + button next to ‘DIMENSIONS‘:

Click on the button next to ‘DIMENSIONS

You will now see a screen like the one below:

You will now see a screen like the one below

Step-6: Search for the ‘Event Name’ dimension and then click on the checkbox next to it:

Search for the ‘Event Name dimension

Step-7: Search for the ‘first user source / medium’ dimension and then click on the checkbox next to it:

Search for the ‘first user source medium dimension

Step-8: Click on the ‘Import’ button to import all the selected dimensions to the report:

import all the selected dimensions to the report

You should now see all the imported dimensions listed under the DIMENSIONS section:

see all the imported dimensions listed

Step-9: Click on the + button next to METRICS:

Click on the button next to METRICS

Step-10: Search and select the following metrics one by one in the exact order as mentioned below and then click on the ‘Import‘ button:

  1. event count
  2. event count per user
Search and select the following metrics one by one

You should now see all the imported metrics listed under the METRICS section:

all the imported metrics listed under the METRICS section

Step-11: Double-click on the dimension ‘Event Name’ so that it is automatically added to the Rows section:

Double click on the dimension ‘Event Name

Step-12: Double-click on the dimension ‘First user source / medium’ so that it is automatically added to the Rows section:

Double click on the dimension ‘First user source medium

Note: When you double-click on the dimensions, you won’t see any change to the canvas on the right. But the dimension has been added to the canvas. When you start adding metrics to the canvas, you will see the dimension(s) added to the canvas.

Step-13: Double-click on the following metrics one by one, starting from the very top, so that they are automatically added to the blank canvas on the right:

  1. event count
  2. event count per user
Double click on the following metrics one by one

Step-14: Scroll all the way down under the ‘Tab Settings’ column until you see the section called ‘FILTERS’:

Scroll all the way down under the ‘Tab Settings column

Step-15: Click on ‘Drop or select dimension or metric’:

Drop or select dimension or metric 2

Step-16: Click on the ‘Event Name’ dimension from the drop-down menu:

Click on the ‘Event Name dimension

Step-17: Click on the ‘Select match type’ drop-down menu:

Click on the ‘Select match type drop down menu

Step-18: Click on ‘Exactly Matches’:

Click on ‘Exactly Matches

Step-19: Click on the ‘enter expression’ text box:

Click on the ‘enter expression text

Step-20: Type ‘generate_lead’ in the text box and then click on the first search result ‘generate_lead‘:

Type ‘generate lead in the text

Step-21: Click on the ‘Apply’ button to apply your filter to the canvas on the right:

apply your filter to the canvas on the right

You should now see a screen like the one below:

You should now see a screen like the one below

That’s how you can see the form tracking data in GA4 via the exploration report. 

Tracking forms via the GA4 user interface

You can also track forms via the GA4 user interface without using the Google Tag Manager.

Follow the steps below:

Step-1: Navigate to ‘Events’ report (under ‘admin’) in your GA4 property:

Navigate to the ‘Events report under admin 1

Step-2: Click on the ‘Create Event’ button:

Click on the ‘Create Event button

Step-3: Click on the web data stream for which you want to set up the form tracking:

Click on the web data stream form tracking

Step-4: Click on the ‘Create’ button to create a new event:

Click on the ‘Create button to create a new event

Step-5: Type ‘generate_lead’ in the text box below ‘Custom Event Name’:

Type ‘generate lead in the text box custom events

Step-6: Set the matching conditions to Page Location starts with <the URL of your thank you page> and then click on the ‘Create’ button:

Page Location starts with

You should now see your new custom event listed:

You should now see your new custom event listed

Step-7: Click on the cross button:

Click on the cross button

Step-8: Once you have set up form tracking in your GA4 property, wait for at least 24 hrs to gather form tracking data in your reports.

Step-9: Navigate to the ‘Events’ report (under ‘admin’):

Navigate to the ‘Events report under admin 2

 You should now be able to see the ‘generate_lead’ event listed under ‘Existing events’:

the ‘generate lead event listed

Step-10: Mark the ‘generate_lead’ event as a conversion by turning on the toggle button next to it:

Mark the ‘generate lead event as a conversion

#1 Google Analytics 4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. Setup GA4 – Upgrade to GA4 – Implementation Guide
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the Difference?
  5. GA4 vs GA4 360 – Pricing, Limits, Billing and More
  6. Google Analytics 4 Training & Tutorial with FREE GA4 ebook

#2 Google Analytics 4 Property

  1. Google Analytics Account Hierarchy (Structure Explained)
  2. Understanding Google Analytics Measurement ID (GA4)
  3. Google Signals GA4 – See Demographics (Gender, Age) in Google Analytics 4
  4. Using the GA4 (Google Analytics 4) Test Property
  5. Google Analytics 4 Sub Properties Tutorial
  6. Roll up Property in Google Analytics 4 (GA4) – Tutorial

#3 Google Analytics 4 Integrations

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. How to link Google Search Console to Google Analytics 4 (GA4)
  4. How to Install Google Analytics 4 on Shopify
  5. GA4 Firebase Integration – Correctly Add App Data Streams to GA4 Property

#4 Google Analytics 4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. Understanding Event Parameters in Google Analytics 4 (GA4)
  3. Recommended Events in Google Analytics 4 (GA4)
  4. Enhanced Measurement Events in Google Analytics 4 (GA4)
  5. Automatically Collected Events in Google Analytics 4 (GA4)
  6. How to Set Up GA4 Custom Events via Google Tag Manager
  7. Events Report in Google Analytics 4 (GA4)
  8. How to Rename Events in Google Analytics 4 (GA4)
  9. How to Use Google Analytics 4 Event Builder
  10. GA4 Form Interactions Tracking – Enhanced Measurement

#5 Google Analytics 4 Conversions

  1. Google Analytics 4 Conversion Tracking Guide – GA4 Goals
  2. How to Import Conversions from GA4 Property to Your Google Ads account
  3. GA4 Conversion Rate – How to find it and use it

#6 Google Analytics 4 Dimensions

  1. GA4 (Google Analytics 4) Dimensions Tutorial
  2. GA4 (Google Analytics 4) Custom Dimensions Tutorial
  3. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  4. Event Scoped Custom Dimensions in GA4 – Tutorial

#7 Google Analytics 4 Metrics

  1. GA4 (Google Analytics 4) Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 (Google Analytics 4) Custom Metrics Tutorial
  3. What are Predictive Metrics in Google Analytics 4 (GA4)

#8 Google Analytics 4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#9 Google Analytics 4 Specialized Tracking

  1. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  2. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  3. GA4 Site Search – Tracking Site Search in Google Analytics 4
  4. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 (Google Analytics 4) Data Import Tutorial
  7. Google Analytics 4 Content Grouping – Create Content Groups in GA4
  8. How to Track Single Page Apps in Google Analytics 4 (GA4)
  9. utm_source, utm_medium, utm_campaign Parameters – GA4 (Google Analytics 4)
  10. GA4 Form Tracking via Google Tag Manager

#10 Google Analytics 4 filters

  1. GA4 filters – Understanding Data Filters in Google Analytics 4
  2. How to Create and Test Filters in Google Analytics 4 (GA4)?
  3. Exclude Internal Traffic in GA4 (Google Analytics 4) via IP Filter

#11 Google Analytics 4 Explorations

  1. Free Form Report in GA4 (Google Analytics 4) – Exploration Report
  2. How to Use the User Lifetime Report in Google Analytics 4 (GA4)
  3. How to Use Path Exploration Report in GA4 (Google Analytics 4) – Path Analysis
  4. How to Use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to Use the Funnel Exploration Report in GA4 (Google Analytics 4) – Funnel Analysis
  6. Cohort Exploration Report in Google Analytics 4 (GA4)
  7. How to Create Landing Pages Report in GA4 (Google Analytics 4)
  8. How to Create Google Ads report in GA4 (Google Analytics 4)
  9. How to Segment GA4 Data by Data Stream
  10. Organic Search Traffic Analysis in GA4 – Complete Guide
  11. Google Analytics 4 (GA4) Outbound Links Tracking
  12. How to Track Email Campaigns and Traffic in GA4
  13. How to track web pages with zero traffic in Google Analytics
  14. How to view full page URLs in GA4?

#12 Google Analytics 4 Advanced

  1. Understanding Google Analytics 4 Sessions
  2. GA4 (Google Analytics 4) Measurement Protocol Tutorial
  3. How to Build Comparisons (Advanced Segments) in Google Analytics 4 (GA4)
  4. Understanding Automated Insights in Google Analytics 4 (GA4)
  5. Understanding Channel Groupings in Google Analytics 4 (GA4)
  6. Understanding Data Sampling in Google Analytics 4 (GA4)
  7. Google Analytics 4 Regex (Regular Expressions) Tutorial
  8. Google analytics 4 GDPR compliance checklist

#13 Google Analytics 4 Reports

  1. How to Create Custom Insights in Google Analytics 4 (GA4)
  2. How to Use Debug View Report in Google Analytics 4 (GA4)

#14 Google Analytics 4 Attribution

  1. Guide to Attribution Models in GA4 (Google Analytics 4)
  2. How to Change Attribution Models in GA4 (Google Analytics 4)?
  3. GA4 (Google Analytics 4) Conversion Paths Report in Attribution
  4. GA4 (Google Analytics 4) Model Comparison Report in Attribution
  5. Advertising Snapshot in GA4 (Google Analytics 4) Attribution
  6. GA4 Attribution Modelling Tutorial

#15 Google Analytics 4 Audiences

  1. GA4 Audiences – Creating Custom Audience in Google Analytics 4
  2. How to Create a Remarketing Audience in Google Analytics 4 (GA4)
  3. Understanding Audience Triggers in Google Analytics 4 (GA4)
  4. Google Analytics 4 (GA4) Predictive Audiences – Tutorial

#16 Google Analytics 4 BigQuery

  1. GA4 BigQuery – Connect Google Analytics 4 with BigQuery
  2. BigQuery GA4 Schema – Send Custom GA4 Data to BigQuery
  3. How to Backfill GA4 Data in BigQuery
  4. How to Connect and Export Data from GA4 to BigQuery

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade

Learn and Master Google Analytics 4 (GA4) - 126 pages ebook

X
error: Alert: Content is protected !!