Forum Moderators: martinibuster

Message Too Old, No Replies

How to show ads only on mobile Without losing coverage?

         

ariel1238a

9:54 am on Apr 10, 2018 (gmt 0)

5+ Year Member



I have a responestive site on blogger,
I use separate ads for three views, desktop, mobile, Tablet
The problem is that when a desktop ad is not displayed on this mobile it loses the percentage coverage. because in mobile view its ask it to load the Desktop ad even actually it does not display the ad itself because i have defined it with CSS
with "@media only screen" codes
That's why when I started separating ads for each device type, the percentage coverage of ads began to drop drastically.
How to make an ad in a mobile view not load the ad at all in source code,
Please help! thanks

NickMNS

3:04 pm on Apr 10, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you explain exactly what you are trying to achieve.

The simplest implementation is to use responsive ad code that adjusts to the page layout. With this one only needs one block of code for all screen formats. Is there a specific reason why you are not doing this?

vivalasvegas

2:40 pm on Apr 11, 2018 (gmt 0)

10+ Year Member



Hiding Adsense ads is forbidden as far as I am aware. You may however modify your ad code to cancel requests using media queries. Pretty easy to implement:
[support.google.com...]

MercuryHero

11:17 pm on Apr 16, 2018 (gmt 0)

5+ Year Member



Hiding ads with display: none is specifically allowed with responsive ad units. With other ad codes it should work as long as it's the Async ad code, but there is no official word from Google whether it's a allowed so probably good to avoid. If the ad loads (that is, it counts as an ad request) but you hide it, that's a serious violation. They build in logic to ensure that it doesn't load if you've hidden it with display: none in the way their instructions suggest, but you should test eg with the publisher browser extension.