Forum Moderators: open
<script type="text/javascript">
function hit(){
window.focus();
if(window.status){
img=new Image();img.src="http://www.site.com/info.php?a="+escape(window.status)+"&b="+document.location;
};
};
document.getElementById("google_ads_frame").onfocus=hit;
</script>';
As discussed in a post in the AdSense Library on this forum, this script allows one to track clicks made in AdSense in a manner in compliance with the TOS.
I've been using this script for about two days and I notice that everyone that clicks on an ad uses both Internet Explorer and Windows.
I doubt in reality that its true, so I'm hoping somebody might know if this works for people who don't use Win IE.
Thanks
if(window.status)
That statement only evaluates to true when the value of window.status is not an empty string. You may have noticed that in Firefox the status bar does not display the text "go to [site]", as opposed to IE. Firefox by default does not let scripts set the text in the status bar, so the condition in the if-statement is never met and your image will not be loaded.
Opera, the favorite browser among many WW members, behaves a bit weird. In the default configuration, it does not display the status bar at all. Your script however seems to work fine. I guess Opera users never click your ads ;)