Mobile app version of vmapp.org
Login or Join
Cody1181609

: Hiding and Showing Google Adsense blocks with Media Queries Is this already acceptable in the Adsense ToS? (can't find any information on this specific case). If the user resizes the browser

@Cody1181609

Posted in: #Css3 #GoogleAdsense

Is this already acceptable in the Adsense ToS? (can't find any information on this specific case). If the user resizes the browser (css 3):
@media screen and (max-width: 980px) {
#skyscraper { display: none; }
}




The idea is to present an horizontal-scroll-free site when the user resizes the browser window to 980px or less.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Cody1181609

3 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

I don't know how things were when you posted your question, but as of now, Google actually recommends "responsive design" over any other option.

This document states that you can use @media queries clearly enough, although not in exact text. (You may also want to read this.) So, what you are doing IS okay.

And don't consider what I am saying baseless. Take Mashable, for example. They do that, and they are one of those top Adsense Premium Publishers.

Tl;dr - As of now, what you wanted to do is perfectly fine by the rules, as I see it.

10% popularity Vote Up Vote Down


 

@Murphy175

I think the terms of service refer to a situation where you load the ads but then do not display them to the visitors, hence mucking up view/click through stats. If you don't load the ad in the first place then it should be be OK. You'd have to do this with JavaScript rather than CSS though - detect the window width, only run the AdSense code if it's wider than a certain number.

10% popularity Vote Up Vote Down


 

@Bryan171

You can't hide ads; it's in the AdSense terms and conditions under "5. Prohibited Uses":


You shall not, and shall not authorize or encourage any third party
to: ... (ii) edit, modify, filter, truncate or change the order of the
information contained in any Ad, Link, Ad Unit, Search Result, or
Referral Button, or remove, obscure or minimize any Ad, Link, Ad Unit,
Search Result, or Referral Button in any way without authorization
from Google;


Seems pretty clear to me. (It's probably because the JavaScript code for the ad would still run, falsely reporting an ad view and stunting the click through rate.)

Moving the ad to the footer area for narrow screens using media queries might be safer.

Update (July 2013): Using JavaScript to detect page width and serve relevant ads, rather than CSS media queries to hide ads after the page has loaded and views have been counted, now seems to be the most sensible option, as in this example.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme