jquery - Google analytics event tracking on javascript form -


how can add "_gaq.push([‘_trackevent’" code tell google track form submit event? not working right now!

i want track successful form subbmit events.

submithandler: function(form) {         $('#loadinglizings').show();         $(form).ajaxsubmit({             type:"post",             data: $("#lizings").serialize(),             url:"assets/process_lizings.php",             cache: false,             success: function() {                  _gaq.push([‘_trackevent’, ‘form’, ’submitted’, ’lizings_form’,, ’true’]);                  $('#lizings :input').attr('disabled', 'disabled');                 $('#lizings_form').fadeto( "slow", 0.05, function() {                     $('#loadinglizings').hide();                     $('#lizingssuccess').fadein();                 });             },             error: function() {                 $('#lizings_form').fadeto( "slow", 0.05, function() {                     $('#loadinglizings').hide();                     $('#lizingserror').fadein();                 });             }         });     } 

you have issue quotes code, assuming exact code have on site. you're using smart quotes, should replaced single quotes ('), this:

_gaq.push(['_trackevent', 'form', 'submitted', 'lizings_form']); 

also, default, events interactive, don't need last "true" parameter.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -