Zkusil bych to takhle:
<pre><code>$(document).on('click', function(event) {
var $target = $(event.target);
var link = $target.is('a[href]');
var callback = !link ? $.noop : function() {
location.href = $target.attr('href');
}
jQuery.get('http://example.com/api/click', callback);
return !link;
});</code></pre>