Analytics - Tag Manager

How To: Track Form Field Values in GA4 Using Google Tag Manager

Form Being Filled In

TL;DR:
Google Tag Manager can capture selected non-personal form field values and send them to GA4 as event parameters alongside a successful form submission. This can help you analyse things like enquiry type, product selection or stages within a multi-step form rather than simply counting submissions. The important part is to only collect useful, predefined values and avoid sending personal information or uncontrolled free-text data to Google Analytics.

Why track form field values as well as submissions?

Tracking a form submission tells you that somebody completed a form. Sometimes, though, you want to understand a little more about what was submitted.

For example, a form might contain a dropdown for an enquiry type, product category or application option. Capturing that non-personal value alongside the submission event can provide much more useful information in GA4 than simply counting the number of completed forms.

I originally implemented this using Google Tag Manager for a client with a multi-step application process. I then recreated a simplified version on my own website to demonstrate how GTM could capture selected form field values and send them to Google Analytics.

The original implementation used Universal Analytics, so some of the Analytics screenshots in this article are inevitably dated. I haven’t recreated the old forms purely to produce new screenshots. The underlying GTM approach remains useful, but today I would send the captured values to GA4 as event parameters.

This is taking form submission and conversion tracking a step further. Instead of only asking “was the form submitted?”, we’re asking “what non-personal information can we safely capture about that submission?”

What form field values can you track in GA4?

Before getting into the implementation, there’s an important distinction between tracking a form submission and tracking values from the fields within that form.

A standard form tracking setup might send an event to GA4 whenever somebody successfully submits a contact or enquiry form. That’s useful for measuring conversions, but it doesn’t necessarily tell you anything about the type of enquiry or options the visitor selected.

In the project that originally prompted this article, the client had an application process split across several steps. Their own database already stored the submitted information, but they wanted additional analytics data to understand how users progressed through the process and how different non-personal selections were distributed.

That’s where capturing form field values with GTM became useful.

Suitable values might include things such as:

  • enquiry or application type
  • product or service category
  • selected plan or option
  • a yes/no selection
  • the stage reached in a multi-step form

I would not use this technique to send names, email addresses, telephone numbers, addresses or other personally identifiable information to Google Analytics.

The objective isn’t to reproduce the contents of your form inside GA4. It’s to add useful, non-personal context to the event you’re already using to measure the submission.

Privacy considerations when tracking form field values

Before sending form field values to GA4, think carefully about what those values contain.

Google Analytics shouldn’t be used to collect personally identifiable information such as names, email addresses, telephone numbers or postal addresses. I’d also avoid sending free-text form fields where you can’t control what somebody might enter.

This technique is much better suited to predefined, non-personal values where you know exactly what can be submitted.

Good examples include:

  • enquiry type
  • product or service category
  • selected package or option
  • yes/no responses that don’t reveal sensitive information
  • stages completed within a multi-step process

A dropdown containing SEO, Analytics and Website Migration, for example, is much easier to safely use as an analytics parameter than a free-text field asking somebody to describe their enquiry.

Just because GTM can access a form field doesn’t mean you should send its value to Google Analytics.

Decide which values are genuinely useful for analysis, make sure they don’t identify the person submitting the form, and consider your wider consent and privacy requirements before collecting them. I’ve covered related implementation considerations in my guide to Google Consent Mode.

How to capture form field values with Google Tag Manager

The original example used a simple form on my website containing several fields. The objective was to capture selected non-personal values when the form was submitted and make them available as variables within GTM.

The screenshots below come from that original implementation. The website and form no longer exist in this format, but they demonstrate how the values were exposed to GTM and captured for use in an Analytics event.

Test Form

The form fields that you should be allowed to track in this case would be job title and the value selected in the drop-down box.

Step 1 – Find the form field values in GTM

Start by opening the page containing your form through GTM Preview mode and submit the form with some test values.

In Tag Assistant, select the relevant form submission event and inspect the information available to GTM.

In my original example, the submitted form elements were available within the event data, allowing me to identify the individual fields and their values.

Form Elements in Data Layer

The form elements appeared in an array, starting at position 0:

  • Name – cf_name – position 0
  • Email – cf_email – position 1
  • Job Title – cf_job_title – position 2
  • Drop Down – cf_drop_down – position 3

Name and email were visible to GTM because they formed part of the submitted form, but that doesn’t mean they should be sent to Google Analytics. For this example, I only needed the non-personal values relevant to the analysis.

Step 2 – Create variables for the form field values

Once you’ve identified where the required values are available, you need to make them accessible as variables within Google Tag Manager.

In my original implementation, the form elements were available within an array attached to the GTM form submission event. Because arrays start at 0, I could reference the individual elements by their position.

For example, the third and fourth elements could be accessed using:

gtm.element.2.value

and:

gtm.element.3.value

I created Data Layer Variables in GTM for these values so they could subsequently be used within the Analytics event.

Data Layer Variable Config 1

and

Data Layer Variable Config 2

It’s worth stressing that this exact variable path won’t necessarily apply to every form. How the form data is exposed to GTM depends on the website, form implementation and JavaScript involved.

The important part of the process is to use Preview mode to identify where the value you need is available, then create the appropriate GTM variable to retrieve it.

After creating the variables, submit the form again with some test values and check that GTM is correctly populating them.

Form Filled In

These are now populated in the data layer variables:

Populated DLVs

In this example, both values were now available within GTM and could be passed into an Analytics event when the form was successfully submitted.

For a current GA4 implementation, I’d favour predictable values such as dropdowns, radio buttons and other controlled selections rather than unrestricted free-text fields.

Step 3 – Detect the successful form submission

Capturing the field values is only half of the setup. We also need to decide when the GA4 event should fire.

In my original example, GTM’s Form Submission trigger could detect the form being submitted, so I used that as the trigger for the Analytics event.

Form Submission Trigger

Then state the conditions on which to fire:

Test Form Submission Trigger

That approach still works for forms that generate a detectable form submission event, but it isn’t suitable for every website.

Some forms submit using AJAX and remain on the same page. Others display a success message without generating a conventional form submission event, while some redirect users to a separate thank-you page.

Depending on how the form behaves, a successful submission might therefore be detected using:

  • GTM’s Form Submission trigger
  • a unique thank-you page
  • an Element Visibility trigger for a success message
  • a custom dataLayer event generated when the form succeeds

The important thing is to trigger your GA4 event from a genuine successful submission, rather than simply from somebody clicking the submit button.

Step 4 – Send the form field values to GA4

Once GTM can identify both the successful form submission and the values you want to capture, you can send that information to Google Analytics.

Today, I’d do this using a GA4 Event tag, with the form values sent as event parameters.

For example, you might send an event called:

form_submit

along with a parameter such as:

enquiry_type → {{DLV - Enquiry Type}}

This means GA4 records the successful form submission while the additional parameter provides useful context about the option that was selected.

The screenshots below show how I originally implemented this using Universal Analytics. At the time, I created Analytics events using the values captured by the Data Layer Variables.

Analytics Event via GTM

and

GA Event 2

Universal Analytics has since been replaced by GA4, so I wouldn’t configure the Analytics tags this way today. However, the underlying GTM process hasn’t fundamentally changed:

capture the value → store it in a GTM variable → detect the successful submission → send the value with the Analytics event.

The main difference is that GA4 uses events and event parameters rather than the old Universal Analytics Event Category, Action and Label structure.

When I submitted the test form, GTM Preview mode confirmed that the required Analytics tags were firing and that the captured values were being passed into them.

Form Submission Tags

Step 5 – Test the form field tracking

Before publishing this type of tracking, test the complete journey in GTM Preview mode.

Submit the form using known test values and check that:

  • the successful submission is detected
  • the correct GTM variables are populated
  • the GA4 event fires only after a successful submission
  • the expected event parameters contain the correct values
  • failed or incomplete submissions don’t generate the event

For a current GA4 implementation, I’d also use DebugView to confirm that the event and its parameters are actually being received by Analytics.

Don’t stop testing once you’ve proved that the tag fires. Try different form options and, where relevant, deliberately trigger validation errors to make sure unsuccessful submissions aren’t accidentally being recorded as conversions.

How to analyse form field values in GA4

Once the values are being sent as GA4 event parameters, you can use them to add more context to your form submission data.

For example, rather than only knowing that you received 100 form submissions, you might be able to see how those submissions were distributed across different enquiry types, products, services or other predefined options.

If you want to use one of these parameters regularly within GA4 reports or Explorations, you may need to register it as an event-scoped custom dimension.

This is why it’s worth deciding what you actually want to learn before you start collecting form field values. There’s little benefit in sending dozens of parameters to GA4 simply because they’re available.

Pick a small number of non-personal values that answer a useful question about the people completing the form or the choices they’re making.

Taking form submission tracking a step further

The project that originally prompted this article involved a multi-step application process.

Simply tracking the final submission wouldn’t have provided enough information. The client wanted to understand how users progressed through the application and analyse selected values at different stages of the process.

That’s where this type of tracking becomes particularly useful.

Instead of treating the form as a single conversion, you can potentially measure:

  • which stages users reach
  • where users abandon the process
  • which predefined options are selected
  • how different types of submission progress through the form

You don’t necessarily need all of that information for a simple contact form. But for longer application, quotation, onboarding or lead-generation processes, it can provide much more useful insight than a single form_submit event.

The important part is to be selective. Track the information you need to answer a genuine analytics question, not every value you can technically extract from the form.

Should you track form field values in GA4?

For many websites, simply tracking successful form submissions is enough.

If you only need to know how many enquiries or leads your website generates, there’s little reason to make the implementation more complicated.

Form field tracking becomes useful when the values selected within a form provide additional information you can genuinely use. That might mean understanding different enquiry types, comparing product or service selections, or analysing progression through a multi-step application.

Google Tag Manager gives you considerable flexibility in how those values are captured, but that doesn’t mean everything available to GTM belongs in Google Analytics. Stick to carefully selected, non-personal values and avoid sending names, email addresses, telephone numbers, free-text responses or other information that could identify an individual.

The implementation will also vary between websites. Some forms expose their values cleanly to GTM, while others may require a different approach depending on how the form is built and how a successful submission is detected.

If you need help implementing more advanced form tracking, event parameters or other custom analytics measurement, this is the sort of work I regularly handle as a Google Tag Manager consultant and GA4 consultant.




About The Author

I'm Dave Ashworth, a freelance SEO and website optimisation consultant with a background in development and a focus on fixing what's broken, improving what's working, and helping businesses grow through clear, practical SEO.

I combine hands-on technical know-how with years of experience in analytics, content strategy and platform optimisation. Whether it's an audit, a migration, or ongoing performance support, my work's about making websites stronger, faster, and easier to understand for - users, search engines and AI platforms.

When I'm not writing guides or sharing insights, I'm working directly with clients to solve problems, track results, and keep their sites moving in the right direction.

Dave Ashworth

get in touch

If you need some expert website optimisation and configuration, want to find out more, or even just have a question, fill in the form below as I will always be happy to help