• Welcome to XF2 Addons. All the XF2 addons located in the Resources area are available for download once you upgrade your account to Premium membership. In addition, Premium members will get technical support. Premium membership costs only $25.00 USD a year. Once the year has expired you can continue to use the installed addons on your forum as long as you like.

How to add AdSense to the header


Andy

Administrator
Staff member
#1
Here are steps to add AdSense to your header:

1) Admin control panel -> Setup -> Advertising -> Add advertisement

2) Do the following:

Title = AdSense - Container header

Position = Container header

HTML =

HTML:
<div style="width:500px;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Responsive 08/24/16 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-123456789"
     data-ad-slot="123456789"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
Display criteria = Unregistered /Unconfirmed and Registered

Display order = 0
 

Andy

Administrator
Staff member
#6
Upon further testing of these instructions, placing your AdSense in the header is not a good way to go. The smaller size ads will earn less revenue. Also I think it looks nicer to not have an AdSense in the header, I prefer further down the page.
 
Top