Tracking outbound clicks in Google Analytics

Add the code below to links on your site that either point to an external site, or to download events such as PDF downloads.

The last part of the code can be modified by you to be relevant to the link it is placed in. For example ‘/external-link/bbc.co.uk’ or ‘/download/application-form.pdf’. These ‘fake’ URLs will show up in the Content section of Google Analytics. Simply perform a search on the Top Content page for ‘external-link’ or ‘download’ or whatever phrase you use.

This code works by creating a pageview of the ‘fake’ URL every time the link is clicked on.

<a href=”http://www.example.co.uk” onClick=”javascript: pageTracker._trackPageview (’/outgoing/example.co.uk‘);”>

Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Sphinn
  • StumbleUpon
  • YahooMyWeb

Leave a Reply

SEO and SEM Tutorials, Training & Consultancy