jQuery Google Analytics Form Field tracking event


/ Published in: jQuery



Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2. var currentPage = jQuery.url.attr("path");
  3. $(':input').blur(function () {
  4. if($(this).val().length > 0){
  5. pageTracker._trackEvent("Form: " + currentPage, "input_exit",$(this).attr('name'));
  6. }
  7. });
  8. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.