What took so long?! Google has finally announced a beta of a new ad unit designed for responsive designed web pages.
In the past, Google said you can modify your ad code to make it work for responsive design web pages, but now, you have the option of using a native AdSense ad unit specifically for responsive design web pages.
What is Responsive ads?
Responsive web design allows you to dynamically control the presentation of your website according to the properties of the screen/device that it’s being viewed on. By using a responsive ad unit, you can control the size of the ads on your page
Responsive ad units use the new asynchronous ad code. With the asynchronous ad code, you can set the size of the ad code directly via Cascading Style Sheets (CSS), which allows you to dynamically specify the size of the ad that will be served
To access this, go to your AdSense console, login and create a new ad unit. Then from the drop down of ad sizes, select “Responsive ad unit (BETA).” Yes, Google warns this is a beta.
Step 1. Generate the ad code
Step 2. Place the ad code on your site
Step 3. Set the size of the responsive ad unit
Test and Experiments on sizes but here are a few pointers to keep in mind when setting your size:
Responsive ad units have no predefined size, so you need to specify the size dynamically through CSS. As this feature is still in beta,
- 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.
- The asynchronous ad code is responsive on initial page load only, subsequent changes to the ad size (e.g., after a screen orientation change) will not cause a new ad to be displayed. This is something that we’ll look to address in the future.
- Always set a default ad size in case media queries aren’t supported.