Tracking Form Submissions With Google Tag Manager
Tracking form submissions events is an important metric for more websites. Lead generation is in Google Analytics 4 (GA4) using Google Tag Manager (GTM) is a valuable metric to optimize your conversion rates. With websites using forms to collect high-quality leads, it is important to optimize our lead generation. By tracking the activity on your website forms, you can analyze user behaviour and see if and where they are dropping off using each field of the form.
There are a number of different tools you can use to measure a form’s conversion rate, but we will be focusing on sending our data from GTM to GA4 using a form_submit event.
Form Submissions Events In GTM
Before we continue configuring our form submission events, we must ensure we are set up to track form abandonment as well. If you need some help setting up your form abandonment tags, read our blog here.
This blog will cover the following:
- Enabling Form Submissions Variables In GTM
- Setting Up Form Submissions Triggers In GTM
- Configuring Form Submissions Tags In GTM
- Testing Form Submissions Tags In GTM
Enabling Form Submissions Variables In GTM
1. Navigate to the Variable tab in the left menu
2. Under the Built-In Variables click Configure
3. Navigate to the Forms section of the list and enable all of the built-in form variables
4. Click the X in the top left corner of the menu
Setting Up Form Submissions Triggers In GTM
The following trigger setup identifies forms on every page on the website using the condition — Page URL contains /.
1. Navigate to the Trigger section in GTM
2. Click New
3. Select the Form Submission trigger type
4. Select the Check Validation box
5. Enable this trigger when: Page URL contains /
6. Indicate that this form needs to fire on the following events: All forms
7. Name your trigger and click Save
Configuring Form Submissions Tags In GTM
1. Navigate to the Tag tab in the left menu
2. Click New
3. Select the Google Analytics: GA4 Event tag type
4. Connect your GA4 Configuration tag
5. Name your event and add any parameters, in this case, we named our event form_submitted and added two parameters: form_id and page_url
6. Under Advanced Settings there’s the option to add tag sequencing to ensure the form submission tag fires once on a page and after the GA4 Configuration tag.
7. Name your tag and click Save
Testing Form Submissions Tags In GTM
The most important part of any tag configuration is to test that your tags do in fact work!
Open your Google Tag Assistant and fill out your form.
Make sure your form submission tag is under the tags that fire once you properly submit the form.
In Closing
The out-of-the-box form submit functionality in GTM is simple and easy to configure. Unfortunately not all form submissions are made the same.
Stay tuned for our next blog, where we go over troubleshooting form submissions in GTM. If you have any pressing questions or want to chat more about GTM, reach out to our team at [email protected]!
Until then, happy tracking!