Does anyone know if there is some way I can setup a javascript script that will send a AJAX request to a PHP script whenever a certain div is clicked? Why I want this is so that when someone clicks an adsense ad, it will send a Javascript request letting me know it was clicked and what ad was clicked before it sends it on. I am going to be doing some revenue sharing stuff and this would be really helpful in some special cases. If you don't think this is possible, or believe I should do it in a different programming language let me know. Because I know JS can be disabled. If I can't do it in JS, maybe I can do it in PHP. Just need to know if it is possible. And as a side note, would this breach AdSense TOS? Thanks!
If you don't modify the adsense code or it's behavior you're fine. There are already several attempt at adsense clicks tracking, search for open source code to start your own. Personally I don't use it.
the problem is that you need the click event on the links generated by adsense not only on the div and this is in a url that is captured by an iframe and cross site scripting prevent you from doing that I do not think it can work