Updated: Form analytics plugin

Following on from my previous post Form field plugin for google analytics, I have been asked to update the form analytics plugin with tracking capabilities for check boxes.

This version of the script still contains the automatic form field tracking showing:

  • Drop off by form field
  • Time spent in each field

And now also includes tracking of:

  • Check boxes – See which check boxes visitors are selecting (these are now counted as form fields). There is also a separate report on unchecked check boxes, showing how many visitors are opting out of pre-checked fields.
  • Radio boxes – see which radio boxes visitors are selecting
  • Submit button – quickly see how many visitors are pressing submit on your form, allowing easy comparison of total submit clicks VS uniques (showing the rate at which visitors submissions fail due to validation or other) and this can be set as a goal.

As with the previous version of the script, this plugin automatically tracks all of the above once it is included in the page. The events appear in Google Analytics as:

Category: Form: Page title

Action: Field completed / unchecked checkbox / submit

Label: Field name

Value: Time spent in field in seconds

 form analytics events


You can download the plugin below, it’s free to use and share etc. just link back if you find this script useful and let me know if you have any ideas for how to improve it further or other reports/tracking plugins that would be useful.

Be sure to check the scroll reach tracking plugin too.

To install:

  • Requires JQuery to be installed – paste this line of code in the head of your page: <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js”></script>
  • Link to the JavaScript file below beneath the call for JQuery and your Google Analytics Tracking code.

Download the file here: form-tracking-google-analytics-v2

Form Analytics plugin for Google Analytics
Tagged on:     

3 thoughts on “Form Analytics plugin for Google Analytics

  • Hi Dave,

    Thanks for the update. I just did a test and noticed that the “checked” event isn´t working for me. Checking and unchecking a checkbox both send the event action “unchecked checkbox” to Google Analytics. Can you confirm this?


    1. Hi Alex,

      It shouldn’t be doing that, it’s set so that a completed check box is submitted as a “field filled” event whereas unchecked check box is fired as “unchecked check box event” just so that the “field filled” report contains all of you fields that have been completed by a user and the “unchecked check box” report shows all un-filled fields.

      Are the checked check boxes coming through in “field filled”? If not if you could share a link to the page I can have a look at what might be causing it.


  • Hi,
    I installed the script, but I am not seeing it work.
    So I added the jquery, and added the tracking script below the GA script.
    Now when I look at the source of the page, I am not seeing the tags added to the form field. Also, I am not seeing any tracking data after filling out several forms.

    I have a manual onclick event tag on that page and that works fine.
    If you can send me a private reply, I can send you link

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>