Google Analytics: How to track all your outgoing links the easy way
One of the common questions asked following my posts about Google Analytics was “How can I track the traffic to external links without adding the onClick code to each and every link?”
With a bit of searching I found a script that you can place in the header file at the top of each of your pages (you might need to edit the templates if you run Wordpress). The script tracks clicks to external links and reports them in Google Analytics. You need to filter the results in the “Top Content” tab to show page views for “outgoinglink” to get the pages to show.
Let me know how it works out for you.















Good stuff. Just a heads up for Wordpress users that the plugin Ultimate Google Analytics also tracks outgoing links as part of its functionality. I wonder how different the actual code implementation is?
Robert Irizarry June 20, 2007 7:17 am | Reply
Thanks Robert. Here is the link:
Ultimate Google Analytics
Patrick Altoft June 20, 2007 7:36 am | Reply
I put my code in the sidebar since every page calls the sidebar, except for the actual ‘pages’ posts.
Desty July 6, 2007 2:20 pm | Reply
Thanks. very useful
Planet Apex December 18, 2007 11:06 pm | Reply