Upcoming feature
Form analytics
Form analytics lets you see exactly how many users complete each step, and what causes people to abandon your form
What is form analytics?
Form analytics lets you see exactly what people are doing on your forms.
With a good form analytics setup, you can discover:
- How many people are landing on my form?
- How many people start filling in my form?
- How many people are abandoning my form?
- Which steps do people drop out on?
How to track contact forms with Google Analytics
If you’ve already got Google Analytics, you may wish to track success events (i.e. form submissions). This way, you’ll be able to see exactly where form-fills came from and report on them easily.
This guide to Google Analytics form tracking has you covered:
1.) Make sure you have Google Analytics installed
First, you need to make sure you have Google Analytics installed (it sounds obvious, but many do not!).
To do this, check your site’s HTML for code that looks like this –
<!-- Google Analytics -->
<
script
>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA....', 'auto');
ga('send', 'pageview');
</
script
>
<!-- End Google Analytics -->
Note that it may be installed by a third party addon, like Google Tag Manager.
2.) Work out the code you need to run on form submission
The next step is to “fire an event” when your form is submitted. This basically means “tell Google something has happened”.
To fire a “submit” action event for the category “contact form”, you’d run the following code:
<
script
>
ga('send', 'event', 'contact-form', 'submit');
}, false );
</
script
>
Let’s break that code down:
- The code block opens and closes with <script> blocks, which just means it’s JavaScript
- “ga” is a reference to Google Analytics
- “send” and “event” describe what you’re doing – you’re sending an event to Google Analytics
- “contact-form” is the event category. You could change this to anything, like “Lead-form”, “leadgen”, or “website-leads” – it’s up to you.
- “submit” is the event action. Again, you could rename this to anything – like “add”, “complete”, or “send”.
3.) How to actually run the code (the hard way)
You can literally run the above code in your JavaScript console to see a working event in Google Analytics!
But of course, running the code in your JavaScript console is no good – you need this to happen every time somebody submits a form.
One option is to find the ID of the button users will be clicking on submit, and fire the code then. Let’s say your button has an ID of “mybutton123”, your code would look like this:
<
script
>
document.getElementById("mybutton123").addEventListener('click',function ()
{
ga('send', 'event', 'contact-form', 'submit');
}, false );
} ); </
script
>
Which plans allow for form analytics?
You can add form analytics onto any plan - it's not a restricted feature!
Hobbyist plan
- Yes
Agency plan
- Yes
It all starts here...
Start creating beautiful, multi-step forms that convert with a zero commitment free trial (no credit card required):