Google has just launch a new responsive AdSense unit in beta designed to run on responsive websites and blogs. Responsive sites are those that adapt to different screen sizes. For example, a responsive website looks good whether on desktops, tablets or mobile phones.
Since many websites, including this one have implemented responsive designs, launching a responsive AdSense unit is a smart move on Google’s part. Now you will be able to control how ads appear on your site on any device.
Before today’s news, there were just few tricks available for webmasters to use to implement AdSense on responsive sites, and most of the time, it wasn’t clear whether those tricks were legal. Now you don’t have to worry anymore about whether your AdSense implementation is in compliance with Google’s policy.
The new unit uses AdSense’s asynchronous ad code and webmasters can use the same kind of CSS media queries they used when building their websites.
To get started with implementing the new unit, logon to your AdSense account and create a new add unit, then select Responsive ad unit (BETA)
Next, copy and paste the code onto your pages and save it.
That’s it.
The best way to load many responsive units on a single page (up to 3 units) is to load the JavaScript code only once. To do that, copy the line below from one of the ad units and save it in the header of your site.
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Then load only the part of the code below on your pages you want ads to appear, up to three units.
<style>.respunit { width: 320px; height: 50px; }@media(min-width: 500px) { .respunit { width: 468px; height: 60px; } }@media(min-width: 800px) { .respunit { width: 728px; height: 90px; } }</style><!-- RespUnit --><ins class="adsbygoogle respunit"style="display:inline-block"
data-ad-client="ca-pub-985-45-49545"
data-ad-slot="6467675603"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
Enjoy!
Frequently Asked Questions
How can I implement the new responsive AdSense unit on my website?
To implement the new responsive AdSense unit, logon to your AdSense account, create a new ad unit, select Responsive ad unit (BETA), copy and paste the code onto your pages, and save it.
What are responsive sites and why is it important for AdSense?
Responsive sites are those that adapt to different screen sizes, making them look good on desktops, tablets, and mobile phones. It is important for AdSense as it ensures that ads appear correctly on any device.
How many responsive AdSense units can I load on a single page?
You can load up to 3 responsive AdSense units on a single page. It is recommended to load the JavaScript code only once to optimize performance.
What are the benefits of using the new responsive AdSense unit?
The new responsive AdSense unit allows you to control how ads appear on your site on any device. It uses asynchronous ad code and enables webmasters to use CSS media queries for customization.
What should I do to ensure compliance with Google's policy when implementing AdSense?
With the new responsive AdSense unit, you don't have to worry about compliance issues. Simply follow the guidelines provided by Google, use the asynchronous ad code, and implement the unit using CSS media queries.
Why did Google launch the responsive AdSense unit in beta?
Google launched the responsive AdSense unit in beta to cater to the increasing number of responsive websites and blogs. This move allows webmasters to easily display ads across different screen sizes.
Can I customize the size of the responsive AdSense unit?
Yes, you can customize the size of the responsive AdSense unit using CSS media queries. This flexibility allows you to adjust the ad unit dimensions based on the screen size.
What is the best practice for loading multiple responsive AdSense units on a single page?
The best practice is to load the JavaScript code only once for multiple responsive AdSense units on a page. This helps optimize performance and ensures proper ad display.