Google Analytics – Tracking All Outbound Links
Inbound tracking Google Analytics is great, but what about your outbound links?
This gist was written to add a tracking code to all outbound links at render time. It can easily be extended to other uses. Make sure it ends up in the footer of your page, after all links have been loaded into the DOM.