: Will Google AdSense punish me for having 100% width banner ads? I'm using Google AdSense and I've read that they don't like people changing their Ad code. I'm using this code: if ( adWidth
I'm using Google AdSense and I've read that they don't like people changing their Ad code.
I'm using this code:
if ( adWidth <= 625 )
google_ad_size = ["100", "50"]; /* Banner (468 x 60) */
else if ( adWidth >= 626 )
google_ad_size = ["100", "90"];
document.write (
'<ins class="adsbygoogle" style="display:inline-block;margin-top:45px;width:'
+ google_ad_size[0] + '%;height:'
+ google_ad_size[1] + 'px" data-ad-client="'
+ google_ad_client + '" data-ad-slot="'
+ google_ad_slot + '"></ins>'
);
I've added a margin-top and a width of 100%, now will Google punish me for doing that?
I don't want to end up a few weeks after launch with Google banning my account.
More posts by @Berryessa370
1 Comments
Sorted by latest first Latest Oldest Best
There are some guidelines by Google as to how you can add responsive ad units to your blog. See the following two pages from Adsense help center.
About responsive ad units
Create a responsive ad unit
According to information given on those pages, you should use CSS Media Queries and not Javascript to set the size of the ad unit based on the screen width.
I think that you are allowed to add a top margin to the code but to be on the safe side, follow this method - wrap the adsense code within another div and specify a margin for it. This page contains guidelines on what modifications are allowed.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.