Tracking script for AdSense

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

I'm using the following code to track clicks on one of my sites that is
running AdSense.

<script type="text/javascript"><!--

function hit() {
  if (window.status) {
     img = new Image();
     img.src = 'log.cfm?ref=' + escape(document.location) + '&link=' +
document.getElementById("google_ads_frame").onfocus = hit;


All is working fine in IE (The log.cfm file keeps track of everything), but
NOT in Opera and Mozilla Firfox (and I guess some other browsers)

The problem is I think the "onFocus" event handler.

Any suggestions on how I can get this small bit of code to work with more

Small note. The code you see is placed right after the AdSense code itself
and there are no changes made in the AdSense code itself.


Site Timeline