XF 2.1 Google Ad Types and Placements and Mobile Ads

Oldengine

Active member
I realize that this is a huge subject, but I am beginning with the basics.

My reference is: https://xenforo.com/community/resou...ips-and-visual-overview-of-ad-positions.6797/

As a part of that Resource, it lists codes for Special Ad Positions. Where are these codes inserted? In Setup > Advertising, there is a Position Selector that I tested for Forum view Above thread list. I put my Adsense code in the HTML box and that works. However, it didn't want any part of the Special Ad codes.

This whole thing must be a balancing act between ad size, placement and proper ad choice for desktop vs mobile. Using 468X60 or 728X90 do those sizes simply not show on mobile? Do I use smaller ad sizes and suffer the loss on the desktop? How do we deal with Mobile vs Desktop?

No, I don't want to pester my Sponsors or Subscribers. This is primarily for Unregistered/Unconfirmed users and maybe some for Registered users.
 
Last edited:
Google is changing their auto ads. And will be removing static ads.

You can now set a maximum width or height, but ALL ads are now going to be responsive. And 90% of them randomly placed and they don't even match your style.

I think they're still working on it.
 
Try:

Add the line data-full-width-responsive="true" just before the ></ins> in the top part of the AdSense code, so it looks something like:

Code:
<div>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"
     data-ad-slot="XXXXXXXXXX"
     data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<br />
</div>

I used that successfully on a vBulletin 4 -> Xenforo 2 migration to keep the client's old reporting and it worked.
 
Top Bottom