SUBSCRIBE VIA RSS


Subscribe to our feed

Symfony Experts

Symfony Experts
If you have an urgent question for a symfony-related issue, this is the place to ask.

Topics

Stack Overflow


The old fashioned way

RECENT TUNES

August 10, 2007 – 1:57pm Tracking AJAX applications with Google Analytics

In doing some research today for a client, I learned that it is indeed possible to track ajax requests with Google Analytics. All you have to do is make a call to the urchinTracker passing it the page name of the request and it will do the rest. Typically you will want to do this in the code section that handles the ajax response:

var myAjax = new Ajax.Request(
  url, 
  {
    method: 'get', 
    parameters: pars, 
    onComplete: function() { urchinTracker("/yourAjaxPageName" ); }
  }
);

More on this can be found in the Google Analytics Help Center.

Posted by in  Web Development

Comments are closed.