Google launched a new responsive AdSense unit in beta that is specifically designed to run on sites that automatically adapt to different screen sizes. The units enable publishers to support multiple devices with responsive design web pages by letting them specify the size of the ad that will be served.
Publishers can simply create the unit, then modify the sample CSS media queries in the new ad code.
Google also warns that this is a beta option, and you should make sure to test these units on your website carefully.
Here is a screen shot of the beta option in the ad unit setup:
Here are the items Google wants you to be aware of when it comes to this new beta ad unit:
- Be sure to specify fixed pixel values when setting the width and height of the ad to be served.
- Make sure that the specified width and height match one of our supported ad sizes. Please note that link unit sizes aren’t supported at the moment.
- The new ad code is responsive on initial page load only. Subsequent changes to the ad size, such as a screen orientation change, will not cause a new ad to be displayed. We know that this is an important feature for many of you and we’re currently working to address this.
- Always set a default ad size in case some media queries aren’t supported.
As Google notes, one thing that doesn’t work yet is support for screen orientation changes after a page has been loaded. Google plans to address this in the near future, however. For now, Google also can’t provide a breakdown by size for all the ads served by a responsive unit in its analytics tools. That, too, is something the company plans to introduce later.