I looked around, but couldn't find a thread on this already. But Shawn created this script to track clicks here: http://www.digitalpoint.com/~shawn/2005/11/track-adsense-clicks-with-google-analytics.html -- but I can't figure out what to use as the target URL for the goal so it will track properly. Anyone know what the end URL is supposed to be? Oh wait, after re-reading the code I figured it out. Set the goal to where the urchin is pointing at. *slaps forehead...duh*
I tried it and it updates, but it didn't track it properly. It also doesn't display the whole code in the site, only part of it. but when I view the source on the server, it shows it -- but not on the screen. any ideas what I might be doing wrong?
the code it shows to add: <script type="text/javascript"> // by Shawn - http://www.digitalpoint.com/~shawn/2005/11/track-adsense-clicks-with-google-analytics.html // Put this at the bottom of the page (after the last AdSense block) function adsense_click() { if(window.status.indexOf('go to') == 0) { urchinTracker ('/AdSenseClick'); } } var elements; if(document.getElementsByTagName) { elements = document.body.getElementsByTagName("IFRAME"); } else if (document.body.all) { elements = document.body.all.tags("IFRAME"); } else { elements = Array(); } for(var i = 0; i < elements.length; i++) { if(elements[i].src.indexOf('googlesyndication.com') > -1) { elements[i].onfocus = adsense_click; } } </script> Code (markup): It turns up like this: <script type="text/javascript"> // by Shawn - http://www.digitalpoint.com/~shawn/2005/11/track-adsense-clicks-with-google-analytics.html // Put this at the bottom of the page (after the last AdSense block) function adsense_click() } var elements; if(document.getElementsByTagName) else if (document.body.all) else for(var i = 0; i < elements.length; i++) } </script> Code (markup): So it looks like it'smissing something -- where did I go wrong?