Google AdSense Ads and Responsive Website Design creates a problem when a mobile device has width less than an Ad unit. The solution is using conditional tags. We are taking that, the particular Website has WordPress a CMS as most commonly used blogs runs on WordPress and blogs needs Google AdSense Ads. Yes this hypothesis has a fallacy that in some cases Google AdSense Ads will needed to be shown on non WordPress Responsive Website Design, that is a separate topic. We wrote about Responsive Web Design Before.
Do not Change Google AdSense Ads Code But You Can Play With DoubleClick
Handing Google AdSense Ads and Responsive Website Design
Calculate from your Analytics data how many users uses non Android, non iOS devices for surfing your website. Google AdSense Ads needs no change for high end devices.
The problem does not happen with most Android devices, Google AdSense Ads can recognize the device. Google AdSense Officially says to use Mobile Ads for mobile websites. But that is meaningless for a responsive webdesign. What we can do is very easy :
- We need a php script to detect the device, that is basically done by a responsive theme.
- We need WordPress conditional tag to wrap and deliver mobile Ads when the device is mobile and full size when the device can accommodate Google AdSense Ads
How to change Google AdSense Ads in this way ?
First use Ad Injection Plugin. It is very nice plugin to add various difficult filters. You can easily use a PHP based mobile device identification script :
Now, the thing is simple, you probably know about WordPress using Conditional Tags. Now it is fully dependent on your WordPress Theme or Theme Framework how easily you can integrate them. For example, if a div class by default can detect a mobile device (that means it is using that php script) using only the conditional tags wrapped with div can change your Google AdSense Ads depending on the device.
Follow the Author of this article :