Sunday, June 27, 2010

External link track - a one liner

If you use Google Analytics and would like to track which ones of your external links people click on while checking out your website, all you have to do is to add the 'onClick' attribute to the a (anchor) tag in question.

Here's an example code that you could use:
(click in the box to highlight the code for copy)

The '/outgoing/linktrack/001' part can of course be replaced with anything you like.

No comments:

Post a Comment

Dear legitimate commenters, please post your comments below. I'd be happy to receive your feedback; helps me a lot improving, or getting reassurance that I'm doing something really great here.

IMPORTANT! A note to commenters planning on advertising their business in comments: please be informed that I'm NOT going to post your comments but will ALWAYS mark them as SPAM.