A major barrier for many considering Responsive Design is that AdSense ToS specify that one cannot muck about with Google's code. While there are workarounds the closest 'legal' solution is that AdSense is looking into the problem and will be supplying a solution sometime this year. Riiiight.
Then today levo at Webmasterworld posted:
Wow, there is a responsive code recommendation at German Adsense blog.
http://adsense-de.bl...n-websites.html
As the page is in German I ran G-Trans and this is the result:
AdSense for Responsive Design websites
December 11, 2012 | 11:49
Labels: Intermediate , Others
Update on 13 December 2012 relating to our program policies.
our last blog post about Responsive Design , we talked about how important it is to optimize websites for mobile devices, and to understand how Responsive design fits in your planning in this respect. Today, we go a step further and describe how they can effectively use AdSense ads on a site-responsive design. First we would like to reiterate, however briefly, what is meant by Responsive Design.
Responsive Design is a web design technique that adapts the site to the characteristics of the device on which it is displayed. This, for example, can be a laptop, smartphone or tablet. Responsive website design created with a modified automatically when displayed on different devices its size. What content is most important for the mobile user, while her intended.
[images]
Along with the content, it is also adsense ads using a simple JavaScript snippet to adapt to different screen sizes. To take advantage of Responsive Design, you first create multiple ad sizes, for example, 728 x 90, 468 x 60 and 300 x 250 Then it implements a snippet with an "if-else" condition for each of the appropriate display size of the user's device is connected. Here you can see an example of a JavaScript code:
<script type="text/javascript">
google_ad_client = "ca-publisher-id",
if (window. innerWidth> = 800) {
google_ad_slot = " 1234567890 ";
google_ad_width = 728;
google_ad_height = 90;
} Else if (window.innerWidth <400) {
google_ad_slot = " 2345678901 ";
google_ad_width = 300;
google_ad_height = 250;
Else {}
google_ad_slot = " 3456789012 ";
google_ad_width = 468;
google_ad_height = 60;
}
</ script>
<script type = "text / javascript"
src = " http://pagead2.googl...ead/show_ads.js ">
</ script>
Please note that there is, according to the AdSense program policies , is not allowed to make changes to the AdSense code. This is the only recommended changing the code for Responsive Design websites. Any change that does not meet the above JavaScript code, is considered a violation of our program policies.
For details about Responsive Design you learn in this blog post of the Google Webmaster Team (available in English only). And on www.startmobile.de get her more information about the benefits of mobile websites, you can test your web site and look for developers who can assist you in creating a website optimized for mobile devices.
Post by Dairine Kennedy, AdSense Mobile Team
Oh my oh my, way back in December one (German) AdSense team is posting a solution that another (US) AdSense team apparently either doesn't know about... perhaps they need to better organise their own information before tackling the world's.






