Free Google AdSense Tracking Script And Tips On How To Improve AdSense Click-Through Rates

By Robbe D. Morris

Printer Friendly Version


Robbe & Melisa Morris
We've studied site visitor behavior pretty extensively at EggHeadCafe.com with the intent of improving our click-through rates for our AdSense advertising.  Currently, we are prohibited from providing our specific click-through rates because of Google's confidentiality agreement.  The content of this article is meant to help you potentially increase your revenue while not violating the spirit of the agreement all AdSense publishers have with Google.  At the bottom of this article is a script that helps you track information not made available by Google about every ad clicked such as the individual ad clicked, what page it was on, the date and time, etc...
Based on our research and tracking, the most important aspect of deciding how and where to place your text ads is the human eye.  The second is the content itself.  I'll use the EggHeadCafe.com web site as an example.  We have several key areas: technical articles, helpful hints, message board posts, message board conversations, and product reviews.
We have found that ads placed on the outer boundries of the page perform poorly particularly with content such as commentaries or articles.  Left side, right side, top banner, or bottom banner sections are common places where image based advertising was deployed.  The human sees the ad but doesn't place priority on its consumption.  You've undoubtedly noticed over the last year or so that web sites have gone to placing ads in the middle of content pages instead.  This includes everything from text ads to Macromedia Flash movies.
A mid page strategy performs better than the outer boundary strategy.  The mid page strategy can be enhanced if some form of eye catching or useful content is placed either directly to the left or right of the text ads.  We experimented with this and found pictures or flash presentations that aren't selling something next to the text ads was quite effective.  If you have access to them, cartoon comic strips or other humorous content works best.  You'll see an example of this below:


Google's ad area size options are a bit limited at the time of this writing.  As a general rule, you'll want to be able to see the paragraph above and paragraph below the ad area with the ad section in the middle of the scrolled area on the page.  Expect the best results when you keep the ad section clean and easy to read.  Don't make it any more complex than absolutely necessary.  We also recommend not implementing color schemes that don't match the rest of the site.  For instance, if the site background is white, leave the ad area's background white as well.
While the mid page strategy that includes a bold and noticable ad area works well for article or commentary pages, it does not work well for message board posts or message board conversations.  That strategy will yield less than half the click thru percentage.  A message board visitor reads most posts from start to finish or at the very least, they read the first few lines and last few lines of the post.
Our research has found that the most successful solution was to utilize Google's 468x60 option that holds two ads in what we call an end of sentence strategy.  The section should either be right aligned or center aligned on the page.  In most message board posts, the sentence will end towards the middle of the page.  Thus, forcing the visitors eyes to see the ads in close proximity to the message itself.  It is important not to surround the ad section with a border or use an alternate set of colors to distinguish the area from the content of the page.
The end of sentence strategy works well with message board posts because the reader has digested the desired content "prior" to viewing the text ad.  Message board readers are heavily focused on the content of the post because the posts often offer short specific answers not easily found elsewhere.  Thus, they will tend to block out all interruptions until they have obtained what they needed.  The key to success in this area is forcing their eyes to see the related text ad "after" digesting the content of the post.  Google's 468x60 offering gives us two targeted ads that are easy to view without distorting the look and feel of the web page.
Depending on the content of your site, you may wish to place your end of sentence ad area at the end of the first message board post if you are displaying the entire thread (entire conversation).  In many cases, the second post provides a short answer to the original question.  Thus, the text ad area would be visible between the last few lines of the question and first few lines of the answer which is the optimal position.
The last suggestion we have is to utilize the tools made available to you by Google.  Particularly the AdSense ad channels and the AdWords program for advertisers.  The AdSense ad channels enable you to quantify which strategies are successful and which ones need to be adjusted.  The AdWords program is a pretty cost effective way to advertise your site via Google's search engine.  Along with increased traffic, AdWords also gives you a handy tool (via a grossly unfriendly user interface) to budget keywords.  How does this tool help with me with the AdSense program?
You may think you know all the keywords related to your content and which ones are most important to include in most of your pages.  Truth is, you don't.  At least you don't know which keywords are the most valuable.  Take the Microsoft .NET Compact Framework for instance.  This is a framework for developing mobile device applications running a Windows OS.  You would think that advertisers developing software components for this framework would buy up the phrase ".NET Compact Framework" because they could target their ads to developers.  Instead, the keyword budgeting tool tells us that terms such as iPAQ or mobile devices carry the most weight and are more likely to generate a higher dollar per click rate.  This isn't an absolute science but it can be extremely useful in helping you package the words used in your content without fraudulently changing the meaning of the content.  In some cases, you may also find this tactic to actually increase your search engine ranking.
I've included a JavaScript function that you can include in the bottom of your pages.  At runtime, it attaches an onfocus event to every link in the Google AdSense IFRAME.  When the link is clicked, along with allowing the AdSense code to trigger and pull up the ad, it will send a request to your server side page to track information about the ad clicked.  This is incredibly useful for identifying which pages are driving the most revenue, the time of day, which specific ads are doing well, and individuals fraudulently clicking your ads.  If you are ever accused by the AdSense folks of fraudulent clicks, this information good prove useful in your defense.  While Google is not required to accept these logged results nor do they specifically endorse this technique, if the ips and urls in your log match what Google has tracked, it "may" help you.
Of course, you'll have to write your own code to track the information captured.  However, if you need assistance with setting up a small Microsoft Access database and a server side stat capture page, you can request our assistance to develop one for you at info@eggheadcafe.com.  As a general rule, we charge a one time $200 fee to provide our canned approach with basic reporting.  If you require customization, we can prepare a proposal for you.  At the time of this writing, we received confirmation via email that scripts like this do not violate AdSense policy.  Prior to use, you should re-read their policy to ensure that this hasn't changed.
We hope you find these tips useful and your Google AdSense revenues increase.  If you have any questions about this article, please post them to our "Article Discussions" message board.
JavaScript Source Code
 

<script language="JavaScript">
var iFr;
function AdSenseLog()
 { 
    var theAd=""+ escape(window.status.substring(6)) ;
    var format=queryString('format',iFr.src);
    var channel=queryString('channel',iFr.src);
    var bug = new Image();
    var thetitle='<%=Request.Servervariables("SCRIPT_NAME")%>';
    bug.src = '/yourcapturepage.aspx?ref=' + document.referrer + '&url=' +theAd +'&title=' 
                     + thetitle+ '&format=' + format +'&channel='+channel ; 
}  
 
function queryString(item, source)
{
   var itemLoc=source.indexOf(item);
   var newSrc=source.substring(itemLoc);
   var endLoc=newSrc.indexOf("&");
   var lstSrc=newSrc.substring(0,endLoc);
   var itm=lstSrc.substring(item.length+1);
   return itm;
} 
 
 var elements; 
 elements = document.getElementsByTagName("iframe"); 

 for (var i = 0; i < elements.length; i++) 
 { 
   if(elements[i].src.indexOf('googlesyndication.com') > -1) 
   { 
     elements[i].attachEvent("onfocus",AdSenseLog) 
     iFr=elements[i];
   } 
 } 
  
</script> 


Robbe is a 2004-2008 Microsoft MVP for C# and the .NET Evangelist for Alinean Inc..  He is also the co-founder of EggHeadCafe which provides .NET articles, book reviews, software reviews, and software download and purchase advice.