How to create contact form events for GA4

How to Create Contact Form Events for GA4

In Analytics, Google Analytics 4, The Digital Marketing Blog by Ana CorvoLeave a Comment

When it comes to GA4, one of the most common topics we get asked about is how to create contact form events. In this post, we’ll show you the different options for implementing them. So, what are you waiting for, let’s get stuck in! 

Configuring your form tracking through events will allow you to send a lot of data about your form submissions to GA4. You can also configure parameters to send additional information about each form submission, e.g. form name and button label. 

There are currently three ways you can create contact form events for GA4:

  1. Enabling the ‘form interactions’ enhanced measurement event in your web stream settings.
  2. Configuring events through Google Tag Manager (GTM) or any tag management system of your preference.
  3. Hardcoding events with developer assistance. 

Out of these, we recommend configuring events through GTM or the tag management system of your choice in a similar way to how you would for Universal Analytics (UA), and we’ll tell you why shortly! 

It’s important to note that at the time of writing, GA4 enhanced measurement events have a few limitations that prevent us from using them for form tracking. 

Continue reading to find out why, as we explore each tracking option. 

If you have any questions or would like support with any part of your GA4 set up or if you’re looking for support with your data and measurement, get in touch here. We’d love to help!

1. Enhanced Measurement

On the 29th of September 2022, Google announced the ability to measure form interactions automatically through enhanced measurement events

When this feature is enabled, the following events are collected:

  • form_start: The first time a user interacts with a form in a session
  • form_submit: When a user submits a form 

This new feature isn’t enabled by default, but you can access it by navigating to:  

Settings > Data Streams > select your data stream > configure Enhanced Measurement 

When you access the full list of enhanced measurement options, you’ll be able to see many options for tracking, such as outbound clicks or site search. All you have to do is enable form interactions and GA4 will start collecting data on your forms. 

However, there are two problems with this implementation. 

The first is that GA4 might not be able to distinguish between a successful and an unsuccessful form submission. This could cause your form submission data to be inflated by false positives, making it unreliable. 

The second problem happens when you have the Facebook pixel installed, which records the pageview event as a form submission in GA4. This means visitors coming from Facebook might get registered as form submissions, even before they interact with your form. 

The lack of settings in enhanced measurement means there is currently no workaround for these problems. However, as always, we recommend you test the feature for yourself and make a decision based on how the data is being recorded for your site. 

It is possible, and very likely, that Google will improve this feature in the coming months as UA will be deprecated on the 1st of July 2023. In its current state of development though, our recommendation is to configure your form tracking through your tag management system, which is next on our list.

2. Event Tracking Through Tag Management System

The way you implement your form tracking through your tag management system will be highly dependent on how your developers have configured your forms. 

So the first thing you’ll need to do is use the preview mode in your tag management system and test your form. This will allow you to see what data you’re working with, so you can define your tag and trigger. 

Next, make sure you install your GA4 configuration tag, so that Analytics is able to collect data about your website’s visitors. After that, it’s time to create an event tag where you will give your event a name. Have a look at Google’s list of recommended events to see if any of them match the action you’re trying to measure. Using these recommended events will enable GA4 to populate reports and future features will benefit from them as they become available. 

In the example below, I’ve used a custom name for our event that best matches the user action we’re measuring, i.e. contact_form_submission.

Tag Configuration in GA4

How detailed you want to go with event parameters (parameters provide additional information about how users interact with your website) is entirely up to you. 

GA4 gives us an opportunity to think about your marketing strategy in different ways, as you now have access to new data that you can use for decision-making. 

Configuring the trigger for your tag will be the most challenging part because it will depend on how your website functionality has been developed. An incorrectly configured trigger will cause your data to be inaccurate and misleading, so be extra cautious during this step. 

You can configure your trigger in various ways:

  • Set up the tag management system default form submission trigger 
  • Ask your developer to fire a dataLayer.push() event 
  • Configure an AJAX auto-event listener 
  • Create an element visibility trigger
  • Configure a custom auto-event listener
  • Fire the event when the user reaches the ‘thank you’ page 

The examples above are some of the most common trigger configurations we’ve found helpful for our clients. If you want to know more about which triggers would be best for tracking your forms, get in touch with us here. We’d love to help! 

Lastly, always be sure you test your configuration multiple times using GA4’s DebugView. Test until you’re happy to publish your tracking. This will likely take some trial and error, so don’t feel discouraged if you don’t get it right the first time.

💡 Tip: Take your form conversion tracking to the next level by implementing enhanced conversions for leads. This will allow you to measure offline sales by using hashed, first-party, user-provided data from your lead forms. Configure this if you’re running ads to your website pages and you want to measure how many leads are converted into sales. 

Enhanced Conversions for Leads in GA4

Image source:  Google 

3. Hardcoded Events

Hardcoding your events will achieve the same result as implementing them through your tag management system, with one main difference: If you need to configure changes or check tracking implementations you will be reliant on your developer. For that reason, we advise against this option.

Using a tag manager system will allow you to keep all your tracking in one place, manage tracking codes easily, and make changes without developer assistance. 

However, if you’re comfortable with relying on your developers or it’s your only option, all you need to do is pass them this link to the developer guide. It will tell them how to configure the tracking through the Google Tag.

Final Thoughts

With the rapid development of GA4 in the past year, it is possible that Google will address the problems with enhanced measurement, making it the simplest tool for form tracking. At the time of writing though, we recommend using a tag management system such as GTM. 

If you’re feeling overwhelmed about configuring your form tracking or transitioning to GA4 in general, take a look at all the ways we can support you through this Google Analytics property transition. It’s a big change (even for us), so don’t feel alone in this journey. 

Contact Us

If you’d like to discuss your options and understand how we can help you transition to GA4, leave us a message via the form below. We’d love to help! 

  • This field is for validation purposes and should be left unchanged.

 

Leave a Comment