Tracking form field errors in Google Analytics

July 1, 2020 by Adrian Durow . Analytics

99/100 of the Google Analytics properties we come across DO NOT have these tracked!

They are one of our favourite pieces of hit data to send into GA.  We've done so many valuable, productive pieces of CRO off the back of being able to analyse these.

Why track these in Google Analytics?

The less errors a form generates = the more form completions & conversions the site will generate.

Granted, there will be many sessions where users generate field errors, but persevere nonetheless and complete the form.  However, we’ve found that after analysing 1000s of forms, across millions of sessions, the lower the error rate in the session, the more conversions.

If Google Analytics isn’t tracking these, then you’ll be analysing and optimising these forms blind.

 

How to track these

You’ll need to write some custom JavaScript to listen for:

  1. When the error occurs
  2. Which field the error occurs on
  3. What the error message is (as some fields can use multiple error messages)

 

There’s no solid out-of-the-box solution for this out there really.  It’s best for your JavaScript engineer to inspect the code/DOM.  See how the errors are triggered, as some might be triggered on the page, or in-line.  And some might be triggered on a page refresh after attempted submission.

The JavaScript engineer should be able to write some custom JavaScript straight into Google Tag Manager to listen, and collect, those 3 data points above as custom events & variables.  Then all you need to do is send tags into GA for them.

What to measure in Google Analytics?

#1  What % of sessions who start the form, trigger an error?

#2  Which fields & errors are triggered the most?

#3  What % of sessions which trigger an error, actually persevere and complete the form?

#4  Which field errors are the most problematic?  Not just through the volume of errors.  But the field errors which are most likely to lead to an abandonment

#5  All of the above by different dimensions – device category, source, referral path/journey into the form

 

The best way to analyse the above is through conditional & sequential segments once the data is in GA

 

Latest articles