javascript - Google Analytics event tracking not firing in Ajax request -


i have following snippet of code:

$(document).ajaxstart(function(){     $('#thanks').modal();      $('#thanks').on('shown', function () {         _gaq.push(['_trackevent', 'form submit', 'clicks_submit', 'request_appointment']);         var axel = math.random() + "";         var = axel * 10000000000000;          var $iframe = $('<iframe/>');         $iframe.attr('src', 'https://doubleclickurlexampleignore' + + '?');         $iframe.width(1).height(1);         $iframe.attr('frameborder', '0');         $iframe.css('display','none');          $('body').append($iframe);     }); }); 

the #thanks modal shows fine, , according ga debugger chrome extension, ga event tracked correctly:

_gaq.push processing "_trackevent" args: "[form submit,clicks_submit,request_appointment]":  ga_debug.js:25 

other events on page being tracked fine (that aren't called via ajax). ideas? included doubleclick code in case somehow interfering.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

monitor web browser programmatically in Android? -

c# - Using multiple datasets in RDLC -