Resource icon

How to limit the size of Google AutoAds on your forum: No longer works

djbaxter

in memoriam 1947-2022
djbaxter submitted a new resource:

How to limit the size of Google AutoAds on your forum - Avoid the worst of the humongous ads that Google AdSense often displays

First, if you already have ads in certain positions on a page, AutoAds will not overwrite those positions.

You can use the feature described below to keep your ads responsive and still limit the size of the AdSense ads, with or without AutoAds.

Found on Google AdSense support after digging down through a few levels to this page and then scrolling down to the section titled "Specify an expandable width...

Read more about this resource...
 
I had to disable auto ads as they served a 320x250 ad that stuck to the navigation bar on scrolling.

I didn't see it for a week as nobody reported it. However, as it was sticky, it took almost 2/3rds viewing space.

I'm now on generally accepted placements with manual responsive ads.

Check your site daily to see if any ads stick to the navigation bar, even at smaller sizes, as it can take 1/2 of otherwise viewable content away (default XF style).
 
I had to disable auto ads as they served a 320x250 ad that stuck to the navigation bar on scrolling.

I didn't see it for a week as nobody reported it. However, as it was sticky, it took almost 2/3rds viewing space.

I'm now on generally accepted placements with manual responsive ads.

Check your site daily to see if any ads stick to the navigation bar, even at smaller sizes, as it can take 1/2 of otherwise viewable content away (default XF style).
I only saw that once when I was editing ads. I had forgotten either a semi-colon at the end of one of the lines in the ad code or I was missing a closing > I can't recall. But it was definitely an error in the code I inserted.
 
I also had issues with auto ads. I had to turn them off too which is a real pain because it makes mobile vs pc set up much more complicated.
 
If you use a specific ad size placement in a location, AutoAds will not overwrite that.

And if you limit the size as I've done above, you can avoid the worst of the problems.
 
So Google kept overriding my settings trying to make the changes for whatever reason.

I ended up using the below in my extra.css

Code:
.adsize { width: 320px; height: 50px; }
@media only screen and (min-width:480px) { .adsize { width: 468px; height: 90px; } }
@media only screen and (min-width:768px) { .adsize { width: 728px; height: 90px; } }
@media only screen and (min-width:992px) { .adsize { width: 970px; height: 90px; } }

And then used the following for my ad code and it is now working to my liking. Just tossing this in here in case someone else runs across the same issue. Really wish Google would let users select a max ad size for their responsive ad units.

Code:
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle adsize"
     style="display:block"
     data-ad-client="ca-pub-XXXXX"
     data-ad-slot="XXXXX"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
 
@Svoboda excellent. That was the other option Google suggested. I tried the method I posted above first and that worked for me so I didn't try the method you used. :love:
 
Back
Top Bottom