Exit Click tracking on Yahoo Sponsored Links and Adsense

I am looking for any information on how I can go about being able to track exit clicks on Yahoo Sponsored llinks and Adsense or any other form of advertising on my site that goes inside an iframe.
Ideally I want to be able to have stats for how many visitors from source X clicked on Yahoo Sponsored Links for example.
Very grateful to anyone who can provide helpful information. Useless spam replies will be flagged.

See original post by Marcosll