Problem with ads for responsive

Posted in: Newspaper
Post count: 54

Hello,

I have problems with ads for responsive theme. You don’t complaint adsense rules. You need use javascript similar to http://linkea.do/2013/03/18/adaptando-adsense-y-dfp-para-disenos-web-responsive/ for show ads for complaint adsense policy.

Ahh And i have some problems with safari, you can show in my capture ( http://imgur.com/dw94o0R ). My site is http://vivirenelmundo.com

thanks.
http://carrero.es

Post count: 54

For control resposive ads i’ll try this code for my google dfp codes:

<script>// <![CDATA[
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (width >= 800) {
// Activa el anuncio “Leaderboard” de 728×90 para pantallas anchas
document.write(‘<div id=”div-gpt-ad-1386425903792-6″ style=”width:728px; height:90px;”>’);
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1386425903792-6’); });
document.write(‘</div>’);

} else if ((width < 800) && (width > 500)) {
// Activa el anuncio de 468×60 para medianas (tablets)
document.write(‘<div id=”div-gpt-ad-1386425903792-5″ style=”width:468px; height:60px;”>’);
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1386425903792-5’); });
document.write(‘</div>’);

} else {
// Activa el anuncio de 320×50 para pantallas pequeñas (móviles)
document.write(‘<div id=”div-gpt-ad-1386425903792-4″ style=”width:320px; height:50px;”>’);
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1386425903792-4’); });
document.write(‘</div>’);
}
// ]]>
</script>

Post count: 3343

Hello,
Do you manage it?

Thanks

Post count: 54

Hello Marius,

Yes i can manage with this code, but i think than you must fix in your theme for new releases 🙂

Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.