If you are using responsive design, you may be unknowingly violating Google AdSense policy’s fine prints. Here is How to Hide AdSense Unit on Mobile Devices on Websites With Responsive Design in Google Recommended Way to Remain Compliant With AdSense Policy.
Why We Need to Hide AdSense Unit on Mobile Devices on Websites With Responsive Design
When your website has responsive design, then straight cut from Google’s policies :
- Ads must be fully seen on mobile : It not allowed to place ads on mobile optimized sites so that they cover any part of the site content or implementing parts of a webpage to cover any portion of the ads.
- Avoid ad content overlap on mobile : If you have a responsive website design that ads may shift into non compliant positions as the format of the screen changes.
- Avoid large ads above the fold on mobile : Placing 300×250 or larger ad units above the fold on a mobile optimized site may not be allowed.
- Ad units should not get pushed up or down during content loading : It is important for the publishers to clearly distinguish ads from site content. This includes, but is not limited to site layouts in which the ads push content below the fold on mobile devices.
- Two or more ads on a mobile view screen : On mobile devices this includes placing two or more Google ads on the viewscreen at the same time. Please be aware that if you have responsive website design that ads may shift into non compliant positions as the format of the screen changes.
It is 100% safe and compliant to policy to modify Google responsive ad units in the way Google described, please read the official resources and one answer on Product Forums :
---
1 2 3 4 | https://support.google.com/adsense/answer/6307124?hl=en https://support.google.com/adsense/checklist/6051799 https://support.google.com/adsense/answer/6160631?hl=en https://productforums.google.com/forum/#!topic/adsense/ob7_18Wo4-w |
It is violation of policy to modify Google normal ad units (not responsive units) and using larger rectangular ads on mobile devices.. Initially, you may receive policy violation notice for not implementing the rules. If you do not understand anything but is using responsive design, please use Google AdSense responsive ad units – Google Ad servers will automatically hide Ads on very small devices.
Basic matters are – a 336px x 280px or 300px x 250px are huge size ads on small mobile devices, it may give no other way to the user to sweep other than clicking it. We may continue such usage innocently, but there are publishers who deliberately do it. For that reason for mobile devices there is 320px x 100px AdSense ad unit.
Second point is that, in one viewable area of mobile screen, 2 AdSense Ad Units must not appear. These 2 AdSense Ad Units are among the 3 AdSense Ad Units allowed by Google. Within end of the text content, you should finish the 3 units. It will not matter to hide AdSense unit on Mobile Devices with Responsive Design, as you will use new methods by Google AdSense like Page Level Ads.
Hide AdSense Unit on Mobile Devices (Responsive Design)
This is an example of ad unit code for 336px x 280px Ad unit which we are forcing to automatically get vanished when screen size is maximum 800px wide :
1 2 3 4 5 6 7 8 9 10 | <style type="text/css"> .adslot_1 { display:inline-block; width: 336px; height: 280px; } @media (max-width: 800px) { .adslot_1 { display: none; } } </style> <ins class="adsbygoogle adslot_1" data-ad-client="ca-pub-NUMBER" data-ad-slot="NUMBER"> data-ad-format="auto"</ins> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script> |
Above code is derivative from Google’s above example URLs. Google Ad servers can understand legit call – you can not modify normal, non-responsive AdSense ad unit in that way. 800 pixels is a sweet point of compromise, although 1024 pixels max-width
should cover most of the mobile devices. You must generate code for a responsive unit and use right value of data-ad-client="ca-pub-NUMBER"
, data-ad-slot="NUMBER"
. CSS is easiest way to implement as Google allowing now. You definitely can use PHP like language to use some third party library to not push an AdSense unit on mobile device. Your income will increase if you use what Google asking to use. If you use old codes on mobile aka full responsive site, Google AdSense will impose unofficial “fine” by labeling legit traffic as bad quality traffic.
It is obvious – if you replace a 336px x 280px AdSense ad unit with some Third Party Ad on mobile device (like affiliate banner or simply your other web page’s own Ad), it seems to be a great idea – CTR for the Third Party Ad on mobile device will increase! But it is difficult to deploy easily. We recommend to use only Responsive AdSense ad Units on mobile responsive website to show Google AdSense as bare minimum effort – Google can vanish or control the Ad Unit on mobile device. With normal AdSense units, that is not possible.
Tagged With Downloading data https://www google com/adsense/search/async-ads js , hide adsense responsive code only mobile , how to hide adsense adunit in mobile web