Return to Snippet

Revision: 12087
at March 1, 2009 22:52 by dsntos


Initial Code
$(document).ready(function(){ 
  var localserver = "www.prodevtips.com"; 
  $("a").not(".kLink").not("a[href^='http://"+localserver+"']").click(function(){ 
    $(this).attr("target", "blank"); 
    var url = $(this).attr("href").replace(/^http\:\/\/(www\.)*/i, ""); 
    pageTracker._trackPageview('/external/'+url); 
  }); 
});

Initial URL
http://www.prodevtips.com/2008/08/19/tracking-clicks-with-jquery-and-google-analytics/

Initial Description

                                

Initial Title
Track clicks with Google Analytics

Initial Tags
google, jquery

Initial Language
jQuery