Browse By

How To Track Your Form Submissions with Google Analytics

Conversion tracking is a powerful way of analysing marketing spend and deciding where to focus all marketing efforts. When used with other strategies like improving the performance of your site and tracking other on-page clicks like the mailto link, it can be very effective in increasing your website leads. If you are new to contact forms on WordPress, read my guide on how to use Contact Form 7.

Track Your Form Submissions with Google Analytics

The first thing you want to do is create your form. If you use WordPress, I have written an easy guide on how you can easily add a piece of to send events to Google Analytics from Contact Form 7 using DOM events. I’ve also provided a clean Contact Form 7 HTML template you can use here.

If you use a static HTML form or one from Jotform for example you can still send events to Google Analytics which you can then use to setup your goals.

Contact Form 7 TemplateGoogle Analytics Goal Setup

Step 1

In Google Analytics, click on the cog or wheel icon, it is also called ADMIN when expanded.

We may earn a small commision at no extra cost to you if you sign up.

 

Track Form Submissions with Google Analytics | Admin

Step 2

On the ADMIN page click on Goals and then click on the red New Goal button.

Track Form Submissions with Google Analytics | Goals

Track Form Submissions with Google Analytics | New Goal

Step 3

In the Goal setup, select the custom goal and the continue.

Track Form Submissions with Google Analytics | Custom Goal

On the next screen give your goal a meaningful name and select the Event radio button.

Track Form Submissions with Google Analytics | Event

Step 4

This is the final step. Here you have to input all the values that you defined when you first setup your contact form event.

Here is how mine looked like:

<script type="text/javascript">
 var wpcf7Elm = document.querySelector( '.wpcf7' );
 
wpcf7Elm.addEventListener( 'wpcf7submit', function( event ) {
 ga('send','event','eventCategory','eventAction','eventLabel');

}, false );
</script>

Once you input all those values you are all set. Now anytime someone submits an enquiry it will be tracked in Google Analytics as a goal.

Tracking Conversions From Contact Forms

This method works for any form, not just WordPress. Once you use JavaScript to send an event to Google Analytics after the user submits an enquiry, you can use the steps outlined above to setup your goal based on that event.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *