This solution is only helpful if you are using the new Universal Analytics. If you have a WordPress blog, just use the Google Analytics for WordPress plugin by Yoast and you are good.
We’ll be using Event tracking here and the code automatically logs an event when there is a click on external links.
- Include jQuery in your site header.
- Download and host this file somewhere and then include it in site header.
That should work. It will create an event with ‘links’ category, ‘click’ action and the external link as label every time there is a click on external link.
You can find the clicks report in your Google Analytics under Content << Events << Top Events. Connect via twitter if facing a problem.