What is an easy way to track which external links visitors click on (on my site)? I don't want to route them through my page, e.g., href = $my-url?url=$external-url. Is there an easy JavaScript-solution?
Google Analytics will do this, and it also has an array of features that will aid you in reaping in visitors, as well as aiding you to market on your site if needed. You can select A and B versions of a page, and Analytics will display them equally amongst visitors, and then tell you which made the most sales. Using Analytics you can tweak single features at a time to enhance the visitors experience.
More specifically, look at _trackpageview with Google Analytics. you can track any click event, including external links, events in Flash an AJAX calls this way.
<a href="http://somesite.com" onclick="pageTracker._trackPageview("somesite.com");return false">external link</a>
You can also try http://www.picnet.com.au/MET which is kind of a graphical google analitics (heat maps and the such). You can read my blog post about it here: http://www.picnet.com.au/blogs/Guido/post/2010/01/27/PicNet-Mouse-Eye-Tracking-Service-Limited-Release.aspx
Thanks