Tag Archives: hack

jQuery, Thickbox and Google Analytics

Today I had to find some way to track the links within a page using Google Analytics, jQuery and Thickbox. With the new ga.js it is pretty straight forward: $(function(){ if(typeof(pageTracker) != 'undefined') { $('a.thickbox, area.thickbox, input.thickbox') .click( function(){ pageTracker._trackPageview( $(this).attr('href') ); } ); } } );
Posted in JavaScript | Also tagged , , , , | 5 Comments