I am fairly new to gravity forms and JavaScript. But I am wondering if there is a simple way to add an onFocus on each field in a Gravity Form so I can track form behavior in Google Analytics.
Basically I'd like to change:
<input type="text" tabindex="1" class="medium" value="" id="input_1_1" name="input_1">
To
<input type="text" onfocus="javascript:_gaq.push(['_trackEvent', 'form', 'input_1', 'input_1']);" tabindex="1" class="medium" value="" id="input_1_1" name="input_1">
Is this possible?
Thanks for any help on this :)
Cheers
Mattis