How to Track Form Submissions in Google Analytics 4
Tracking form submissions is one of the most important things you can do on your website, transforming your pages from simple brochures into lead-generation machines. If you want to know which marketing campaigns are actually driving leads or how many visitors convert into contacts, this is a metric you have to get right. This tutorial will walk you through exactly how to set up form submission tracking in Google Analytics 4, using both the simple out-of-the-box method and the more powerful Google Tag Manager approach.
Why Is Tracking Form Submissions So Important?
Before we jump into the setup, let's quickly cover why this matters. When you track form fills, you’re no longer guessing about your website’s performance. You can directly answer business-critical questions like:
- Which blog posts or landing pages generate the most leads?
- Are my Google Ads or Facebook Ads campaigns turning clicks into actual contacts?
- What is the conversion rate of visitors to leads on my key pages?
Tracking these submissions turns your website data into tangible business intelligence, connecting your marketing efforts to outcomes you can actually count, like new customers and revenue.
GA4 and Events: The Basics
In Google Analytics 4, almost everything a user does is tracked as an event - from viewing a page (page_view) to scrolling down (scroll). Our goal is to create a specific event that fires every time a user successfully submits a form on our site.
There are two primary ways to set this up:
- Enhanced Measurement: A simple, built-in GA4 feature that can sometimes automatically track form submissions with just a flip of a switch.
- Google Tag Manager (GTM): A more robust, flexible, and reliable method that gives you complete control. This is the recommended approach for most websites.
Let’s start with the easy one first.
Method 1: Using GA4's Enhanced Measurement
Enhanced Measurement is a GA4 feature designed to automatically capture common website interactions without any extra coding. One of these interactions is "Form interactions." When enabled, GA4 will try to automatically fire a form_submit event when a user submits a form.
This method is best for very simple websites with standard "Contact Us" forms that redirect to a "Thank You" page upon a successful submission.
How to Enable Enhanced Measurement for Forms
Setting this up takes less than a minute. Here’s how:
- In your GA4 property, go to Admin (the gear icon in the bottom-left).
- Under the Property column, click on Data Streams and select your web data stream.
- Under the Events section, you'll see a tile for Enhanced measurement. Make sure the toggle is on, then click the gear icon to configure it.
- In the settings that pop up, check that Form interactions is enabled.
- Click Save.
That's it. GA4 will now attempt to track form submissions on your site.
The Limitations of Enhanced Measurement
While this sounds great, the word "attempt" is key. Enhanced Measurement for forms is notoriously unreliable for a few reasons:
- It might not work on forms that use JavaScript for validation or don't trigger a full page reload (like many modern AJAX forms).
- It might record events for incomplete or failed form submissions.
- By default, it only tracks the first form interaction in a session to avoid sending duplicate events. If a user fills out two different forms, you might only see one event.
If you have a very basic form and this works for you, wonderful! But for reliable and precise tracking, it's time to roll up our sleeves and use Google Tag Manager.
Method 2: Using Google Tag Manager for Reliable Tracking
Google Tag Manager (GTM) is a free tool from Google that allows you to deploy and manage marketing tags (like your GA4 tag) without having to modify your website's code. It's the standard for professional analytics setups because of its power and flexibility.
Our GTM plan involves three core components:
- Variables: These are placeholders for information that can change, like a form's specific ID or class.
- Triggers: These listen for specific events to happen on your site, like a form being submitted. The trigger tells our tag when to fire.
- Tags: This is the piece of code that does the work - in our case, sending the form submission event to GA4. The tag is what fires.
Step 1: Enable Form Variables in GTM
Before creating a trigger, we need to tell GTM which types of information to "listen" for on our forms. These are called built-in variables.
- In your GTM Workspace, navigate to the Variables section on the left menu.
- Under the Built-In Variables block, click Configure.
- A list of variables will appear. Scroll down to the Forms section and enable all the form-related variables, especially
Form ID,Form Classes, andForm URL.
This simply makes GTM aware of these form attributes so we can use them to build a precise trigger.
Step 2: Find a Unique Identifier for Your Form
We need to tell our trigger exactly which form to track. The best way to do this is with its ID. If your form doesn't have a unique ID, a class can also work.
- Go to the page on your live website where your form is located.
- Right-click on one of the form fields and select Inspect.
- Your browser's Developer Tools will open. Look a few lines up from the highlighted code until you find the opening
<form>tag. - Look for an ID attribute. For example, you might see something like
<form id="contact-form-7">. In this case, "contact-form-7" is our Form ID. - Jot down the Form ID. We'll need it in the next step.
Step 3: Create a Trigger for Your Form Submission
Now, we'll build the trigger that fires only when our specific form is successfully submitted.
- In GTM, go to Triggers and click New.
- Give your trigger a clear name, like "Trigger - Contact Form Submission."
- Click on the Trigger Configuration box to choose a trigger type. Select Form Submission from the list.
- We only want to track valid submissions. Check the box for Check Validation. This tells GTM to wait for other scripts on the page to finish before firing and helps prevent false triggers on forms with validation rules (e.g., a required email field).
- Switch from All Forms to Some Forms.
- Now, we set the condition. From the first dropdown, select the Form ID built-in variable we enabled.
- Leave the second dropdown as contains.
- In the third field, paste the Form ID you found earlier (e.g., "contact-form-7").
- Click Save.
You've just created a trigger that will fire only when the form with your unique ID is submitted.
Step 4: Create the GA4 Event Tag
With our trigger ready, it's time to create the tag that sends the event data over to Google Analytics 4.
- In GTM, go to Tags and click New.
- Name your tag something descriptive, like "GA4 Event - Generate Lead."
- Click the Tag Configuration box and select Google Analytics: GA4 Event.
- For the Configuration Tag, select your existing GA4 Configuration tag. (If you don't have one, you'll need to create it by entering your GA4 Measurement ID).
- In the Event Name field, enter a name for your event. Use lowercase letters and underscores instead of spaces (snake_case). A good name would be
generate_leadorcontact_form_submit. This is the name you will see in your GA4 reports. - Next, click the Triggering box at the bottom.
- Select the trigger you just created ("Trigger - Contact Form Submission").
- Click Save.
Step 5: Test and Debug in Preview Mode
Never publish changes without testing them first. GTM's Preview mode is your best friend here.
- In the top-right corner of your GTM workspace, click Preview.
- Enter your website URL in the popup and click Connect. A new tab will open with your website, and you'll see a small "Tag Assistant" box in the corner.
- Navigate to your form page and fill out the form with test information. Click submit.
- Go back to the GTM Preview tab. In the left-hand event list, you should see a "Form Submission" event.
- Click on that form submission event. You should see that your new GA4 event tag ("GA4 Event - Generate Lead") has successfully fired.
- For final confirmation, go to your GA4 account, navigate to Admin > DebugView. You should see your
generate_leadevent appear in the timeline within a minute or two.
Did it work? Great! If not, double-check that your trigger condition (e.g., the Form ID) exactly matches what is on your website.
Step 6: Publish Your Changes
Once you’ve confirmed everything is working correctly, you're ready to set it live.
- Exit Preview Mode and return to your GTM workspace.
- Click the blue Submit button in the top-right.
- Give your version a descriptive name (e.g., "Added Contact Form Tracking") and click Publish.
Your new form submission tracking is now live for all users!
Marking Your Event as a Conversion in GA4
The final step is to tell GA4 that this new event is a key business interaction, also known as a conversion. This allows it to appear in conversion reports and be used for attribution.
- Back in your GA4 property, go to Admin.
- Under the Property column, click on Conversions.
- Click the New conversion event button.
- In the text box, paste the exact event name you created in GTM (e.g.,
generate_lead). The name must match perfectly. - Click Save.
It can take up to 24 hours for new conversion event data to begin appearing in your standard reports. You should see a green toggle appear next to its name in the conversion list once GA4 starts receiving them.
Final Thoughts
Setting up form submission tracking in GA4 provides invaluable insight into how users engage with your most important calls-to-action. While Enhanced Measurement offers a quick fix for simple sites, diving into Google Tag Manager gives you precise, reliable data you can use to make smarter marketing decisions - from optimizing ad spend to improving your content strategy.
While configuring this tracking is a crucial first step, the real objective is to easily connect this data to your business results. Constantly digging through GA4, exporting CSVs, and manually stitching together reports to see which ad campaigns generate leads can be a huge time-sink. To solve this, we built Graphed. After easily connecting your data sources, you can ask in plain English for what you need - for instance, "Show me a dashboard of leads from Google Ads vs. Facebook Ads this quarter" - and get an instantly generated dashboard. It's all about getting answers in seconds, not hours.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.