Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save simondahla/8023647 to your computer and use it in GitHub Desktop.
Save simondahla/8023647 to your computer and use it in GitHub Desktop.
if (typeof jQuery != 'undefined') {
jQuery(document).ready(function($) {
$('form input').blur(function( e ){
var me = $(this), form = me.parents('form');
ga('send', 'event', (me.attr('name') || me.attr('id')), (me.val().length > 0 ? 'filled' : 'empty'), $(this).attr('name')]));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment