I need to add to code to a bunch of pages that will monitor links when clicked and send off an ajax request.

The response To The Ajax call is not relevant or required, but I need to be able to send it off reliably and then allow the link, or button, To just do what ever it was going to do before.

I know this is done by both Omniture and Google analytics code but after pouring through both of the JavaScript Libraries for those I cannot seem to figure it out.

Does anybody have any insight into how either of these guys handle this problem?

Thanks.

### EDIT:

**Context**: The reason I need to do this is because I am adding a call to a custom API on many different pages when a link is clicked (the actual link is text matched from CMS input so i can't REALLY know what it is). It's going to hit many codebases with many approaches to what their links and buttons do. sometimes then will have their own JS events, sometimes `onclick` handlers, sometimes be native links to the same window, sometimes a new window... the point is that whatever that click does... i am entering a *world of pain* if i try to cancel and re-start it. I don't, and can't, control these codebases and I have to be very unintrusive with my approach here. My thought is that I need to get the call out on a single click listener without doing `e.preventDefault()` or `return false` as that could likely break the page's intended functionality.

I thought about doing a synchronous ajax call but it just seems so dirty. that and it's deprecated. i really want to avoid that. I know Omniture adds a 500ms delay but i don't know *HOW* they do that.