home shopping network

Track AdSense Clicks With Google Analytics

In order to change and have a better lifestyle. I think Google Adsense is my only income right now. However it was not enough even to survive in my life, I still need to found out the way how.

Today, I was accidently found a way to track my adsense click with google analytics. How ever I will never happen until now. But I found a little JavaScript code can be setup an AdSense click as a “goal” within the Analytics interface.

<script type=“text/javascript”> // by Shawn - http://www.shawnhogan.com/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>

 

This only works with Internet Explorer because of some limitations/bug with Mozilla.

Popularity: 7% [?]

If you’re new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Stumble it!


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Last 7 Related Articles

Latest Related Post

What Do You Think?

122 views
Close
E-mail It