When AdSense launched about a decade ago, people mostly accessed websites from their desktop or laptop computers. Fast forward today and all sorts of devices – mobile phones, gaming consoles, ebook readers and even televisions – are being used to connect to the Internet. →
Web designers are therefore increasingly relying on a technique called Responsive Web Design where a single layout of the websites works across all devices, irrespective of the screen size or the resolution of the device.
Google AdSense ads are fixed-width but there's a little workaround that can make your Google ads responsive. The idea is that if a visitor is reading your web page on a large desktop screen, they are served the large 728×60 or 336×280 units while if another visitor is viewing the same page on a smaller mobile screen, you can dynamically serve the 200×200 (or similar) ad unit.
I shared the relevant JavaScript snippet last year and, since then, its been a topic of debate in several online forum threads. The primary concern among web publishers was (and still is) that Responsive Google Ads could be against Google AdSense policies since they require modification in the default JavaScript code.
WebSonic.nl, an AdSense publisher from Netherlands, contacted the Google AdSense team for a confirmation and here's the official response (in Dutch):
AdSense-advertenties kunnen samen met uw inhoud worden aangepast aan verschillende schermgrootten met behulp van een eenvoudig JavaScript-fragment. Om te kunnen profiteren van responsief ontwerp, maakt u eerst meerdere advertentieformaten, bijvoorbeeld 728×90, 468×60 en 300×250. Vervolgens implementeert u een 'if-else'-fragment zodat het juiste advertentieformaat wordt weergegeven op basis van het formaat van het apparaat van de gebruiker.
De voorbeeld website die u stuurt geeft al de juiste javascript code die u kunt gebruiken. Wel wil ik nog even benadrukken dat verdere verandering van de AdSense code niet is toegestaan. Ook mogen advertenties niet worden verborgen met CSS.
The rough English translation is:
AdSense Ads can be adapted to different screen sizes using a simple JavaScript snippet. To take advantage of responsive design, create multiple ad formats, such as 728×90, 468×60 and 300×250. Then you implement an “if-else’ fragment so that the right ad format is displayed based on the size of the device of the user.
The example website that you sent has the correct JavaScript code that you can use. Well I would like to emphasize that further change the AdSense code is not allowed. Advertisements may also not be hidden with CSS.
Thus you won’t violate any of the AdSense program policies for using responsive ads on your website. The JavaScript snippet isn’t modifying the AdSense code but is simply requesting a different ad unit based on the viewport width of the current visitor's screen.
This story, Google Approves Reponsive AdSense Ads Technique, was originally published at Digital Inspiration on 20/02/2013 under Google Adsense, Internet.
No comments:
Post a Comment