Re: Outbound Links

  •  04-15-2008, 9:38 PM

    Re: Outbound Links

    You can accomplish that by using Unobtrusive JavaScript, library like jQuery.com will do that for you.
     
     
    This will affect all link in your document:

        $(document).ready(function() {
           $('a').onclick(function() {
                   pageTracker._trackPageview(  $(this).attr("href")  ) ;
            return false;
            });
          
         });
     

     
    This will affect only links in the <DIV id="content"> in your document:

        $(document).ready(function() {
           $('#content a').onclick(function() {
                   pageTracker._trackPageview(  $(this).attr("href")  ) ;
            return false;
            });
          
         });

    Enjoy!
View Complete Thread