TRack outbound links in Google analytics

/ Published in: JavaScript
Save to your folder(s)

Copy this code and paste it in your HTML
  1. $("a").click(function() { // all links are outbound for this project
  2. $anchor_element = $(this);
  3. pageTracker._trackPageview ('/outgoing/' + $anchor_element.attr("href"));
  5. return false;
  6. });

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.