Should Google Analytics Event Tracking trigger an XHR request?

I am trying to set up Google Analytics event tracking . This is my code:

var uid = getUUID();
function postGA() { 
    var sliderval = $("#slider-stock").slider("value");  
    _gaq.push('_trackEvent', uid, sliderval); 


I notice that postGA()

Firebug does not log the XHR request on startup.

Is this normal or should I expect to see it? If the latter, is there something clearly wrong with my code?


source to share

3 answers

You can see the request if the event tracking code was correct. See the Event Tracking Guide


 _gaq.push(['_trackEvent', uid, sliderval]); 


Install Chrome and Google Analytics Debugger . Look at the console (control, change, j) for event tracking handling.

enter image description here

If you don't see the event tracking there, then something is happening to the tracking code on the page.



I think it is loading into the Google Analytics tracking pixel - I can see it loading on my site in the Inspector (resource view). He called__utm.gif

Query string parameters appended to gif are described in:



This page should give you an idea of ​​how analytics works.



All Articles