Tracking Activity On Your Outbound Links using Google Analytics

Filed under: Analytics, Google — Tags: , , , — Ian Lavelle @ 12:59 pm

A topic that comes up quite often in SEO discussions is the merits of outbound linking, whether you should link to your competitors and if outbound links encourage visitors to leave your site. You should consider the user experience first and foremost when thinking about outbound links. If the link directs the user to relevant content that they would be interested in, then the link is worthwhile. If you’re worried about excessive loss of traffic through external links, then it makes sense to keep a close eye on the click activity around these links.

There are a few different ways of measuring the number of clicks on outbound links from your site. The one I wish to highlight is a fairly neat way of tracking these clicks in Google Analytics, that some of you may not be aware of. Unfortunately, the ‘Site Overlay’ feature of Analytics only gives you click volume on your site’s internal links, and not the links pointing away from your site.

For the purposes of illustration, yesterday evening I tagged up one of our previous blog posts, David Boyd’s thought-provoking ‘Viral Videos and the SEO Payoff’. This particular post contains 6 links to YouTube videos in the second paragraph, the first of which is a clip called ‘Charlie Bit My Finger’. A regular link to this YouTube page might look like the following:

< a href=”http://www.youtube.com/watch?v=_OBlgSz8sSM”>Charlie bit my finger< /a>  (Spaces added for display purposes)

However, I’ve tweaked this slightly (along with the other links), so I can see how many visitors to this blog post click the links to each video. If you look in the source code for the post, you’ll see the link looks as follows:

< a href=”http://www.youtube.com/watch?v=_OBlgSz8sSM” onClick=”javascript: pageTracker._trackPageview(‘/outgoing/CharlieBitMyFinger’);”>Charlie bit my finger< /a>

The part bolded above is the addition that’s needed to register the click information for this link in Google Analytics. When someone clicks one of these links, it’s registered as a page view in Google Analytics. Note that the part in brackets ‘/outgoing/CharlieBitMyFinger’ can be anything of your choosing, but it makes sense to keep it meaningful. When you wish to see how many visitors are leaving your site through each of the links you’ve added, you need to run the ‘Top Content’ report in Google Analytics. Here’s my example:

Tagging each link with /outgoing/ makes it easy to filter your report like in my example above. What I can see from the above report is that, in the last day, 2 people have visited the Outrider blog post on ‘Viral Videos and the SEO Payoff’ and then clicked on the link to the YouTube video ‘Charlie Bit My Finger’, with one click each on the links to ‘Beached As’ and ‘Mean Kitty’.

Note: this only works for sites that are using the new version of Google Analytics tracking script, not the old legacy version. To see how to implement this functionality using the old tracking script, please see Google Analytics Help.

Tags: , , ,

Share |

1 Comment »

  1. I’ve thought about using a bit.ly redirect to track outgoing clicks but this would be much more handy! Thanks for sharing :)

    Comment by Jen (jenius.com.au) — September 4, 2009 @ 1:35 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment