Embellish Ad units and Link units without fear of empty blocks. A nice way to increase the CTR of Link units and Ad units while making sure that you don't have any page with an empty AdSense block: use collapsing units script as a base for further Javascript actions. Have you ever thought of doing something beautiful with your AdSense blocks? I'm sure many of you now know about the "images next the ads" which increase your CTR everytime, some of you who don't allow Public Ads to display when there isn't enough ads in Google's inventory to display on your page may know about collapsing units which can hide empty AdSense blocks and re-gain the space in your page. Well, the html file that Google provides you with can be adapted to do more things than hiding the AdSense block, for example it can hide additional HTML elements if the AdSense block is empty, or show hidden elements waiting to be activated via JavaScript. I would like to provide you with a very simple example on this page. At the top of this article you should see a Link unit accross the page size 728x15 On the top of this Link unit there is this graphic: Well, if you don't see this Link unit, it means there is no ads to display for this article and you should not see the graphic above, how is this possible? Simple, I use a DIV around the graphic and the AdSense block, which I've named id="google_ads_adlink" and then in the AdSense code I use as google_alternate_ad_url this file : http://www.senserely.com/google_adsense_script_adlink.html (right click to download it) Here is an extract of the code for setting up your AdSense block : <div id="google_ads_adlink"> <img src="http://www.senserely.com/images/bg-adlink.gif" width="751" height="10" /> <div style="background-color: #f3a84e; width:728px;"> <script type="text/javascript"><!-- google_ad_client = "pub-XXXXXXXXXXXXX"; google_alternate_ad_url = "http://www.senserely.com/google_adsense_script_adlink.html"; google_ad_width = 728; google_ad_height = 15; google_ad_format = "728x15_0ads_al"; google_color_border = "f3a84e"; google_color_bg = "f3a84e"; google_color_link = "000000"; google_color_url = "000000"; google_color_text = "000000"; //--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></div></div> Code (markup): You can see that the IMG tag is withing the DIV id="google_ads_adlink" and so will be hidden in case there is no Adlink to display... Here is the code for the alternate url which contains the javascript to hide the DIV id="google_ads_adlink" : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> <script type="text/javascript"> var w = window; if (w.parent.document.getElementsByName) { var google_ad_frames = w.parent.document.getElementsByName("google_ads_frame"); var google_ads_adlink = w.parent.document.getElementById("google_ads_adlink"); for (var i = 0; i < google_ad_frames.length; i++) { var f = google_ad_frames[i]; if (f.contentDocument) { if (w.document == f.contentDocument) { f.height = f.width = 0; google_ads_adlink.style.display="none"; } } else if (f.contentWindow) { if (w == f.contentWindow) { f.height = f.width = 0; google_ads_adlink.style.display="none"; } } } } </script> </head> <body style="background-color: transparent;"> </body> </html> Code (markup): Here you go, enjoy this example and other ideas you can come up with and if you have any question to ask please do so in this thread or on the article's comment form. For those who would of course want to ask if it is allowed by AdSense's ToS, yes it is, so please don't ask why it is. If you like this AdSense tip and would like to share it with other AdSense publishers then please digg it but if you prefer not to tell too many people about it then don't
I think adlink unit look like site navigate already, just put where the navigate should be that got a lot of attention. well it might be a good tip for other people!
SVZ I already answered that point in the last sentence of my post. For people who don't believe me (it means you are careful, which is a good thing, you're not jumping on any dirty trick) then look at this thread and particularly my post: http://forums.digitalpoint.com/showpost.php?p=875583&postcount=7 That's in this AdSense minded WordPress template that I saw the tabs graphics for the first time, I had already worked out the alternate_url javascript for other applications (a drop shadow under an AdSense block for example) A quick look at the mentionned template's homepage today confirms it: " Good news everyone! Google AdSense Team has replied, below is the content of th email :- Hello Bryan, Thanks for your email. After reviewing your theme, I’ve found that it’s currently acceptable by our policies. For additional questions, we encourage you to visit our AdSense Help Center at https://www.google.com/support/adsense . If you’re unable to find an answer there, please feel free to reply to this email. Sincerely, Arlene The Google AdSense Team So, it’s now confirmed that Ads Minded theme is 100% compliant with AdSense TOS and safe to be used! " Fuzzylogic yes of course I've thought of that and that's why I'm doing that, this is not modifying AdSense code. You can put pretty much what you want in the alternate_url field, they give you a sample code for hidding the ads because otherwise under 0.001% of adsense publishers could come up with this javascript, but they don't say not to modify THAT code. tonyinabox the point of this thread is not so much the tabs-looking adlink, it's more about using the collapsing unit script as a base for doing more things than just hidding the empty adsense blocks. Then it's up to you to come up with something adapted to your sites. Hope this helps, is it clearer now why it's ok to use this tip?
what's with the large & bold fonts? are you blind or something? writing sales copy for diggs... wordpress adsense theme looks great dough.. http://forums.digitalpoint.com/showthread.php?p=875583#post875583
What you have something against using the formatting tools? Plus I realise I gave my thread the wrong title, because it is not about making ads stand out after all, it's just the fact that you can do it without fear of having your graphics alone without adsense when there is no ad to display.