homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & martinibuster

Google AdSense Forum

4 AdSense ads but show only 2

10+ Year Member

Msg#: 4572176 posted 6:48 am on May 9, 2013 (gmt 0)

I just made my site responsive and when the screen is wide (more than 700px) it shows a side template on the side of the page with 2 ads. Using media queries when the screen is less than 700px it hides the side template and show two other templates, one at the bottom and the other one on top.

Is that the correct way to do it? would I get penalize for having 4 codes in the same page?



5+ Year Member

Msg#: 4572176 posted 11:46 am on May 11, 2013 (gmt 0)

If you're using css media queries to hide/show the extra ads (eg display:none / block or whatever), then no, that is not allowed. All 4 will load, they're just not visible, which is against the TOS.

Google has recently written this about responsive websites which does provide an alternative:

Sorry, I can't find that in English, but translate works enough to get the idea across.

It's not the smoothest solution, but it's the only way I've seen that's 'Google approved'.


Msg#: 4572176 posted 2:21 pm on May 13, 2013 (gmt 0)

Sadly, the code referenced by LunaC could also get you in trouble. I had one member of the AdSense team tell me it's ok to use that code, only to get another team member tell me a few weeks later that its not ok and that the first team member was wrong. (Rolling Eyes).

Anyway, I'm now using the Adzerk ad server to serve my AdSense ads. It allows you to load or not (Adsense) ads depending on browser width:


This should be completely safe as you don't need to modify the AdSense code and you only load needed ads depending on your browser width, not resorting to CSS show/hide tricks.


5+ Year Member

Msg#: 4572176 posted 11:17 am on May 14, 2013 (gmt 0)

Hmm, A case of one hand not knowing what the other hand is doing at Google I'd guess... Sadly that isn't terribly surprising.

A translation of the red text:
"Please note that it is in accordance with the AdSense program policies , not permitted to make changes to the AdSense code . This is the only recommended change of the code for responsive design websites. Any change that does not meet the above JavaScript code will be considered a violation of our program policies."

Maybe they mean having one not load at all on small screens or something? eg: else { } Who knows... Google is a mystery.

Either way, in that case, it may be better to go with Adzerk or something else.

Having to second guess each move and question what Google 'really means' when they say anything makes me a sad panda. :(

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved