How to add AdSense to the header


Andy

Administrator
Staff member
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
Example of AdSense in header.

1520695784456.png
 

Andy

Administrator
Staff member
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.
 

RC

Well-Known Member
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.
Thanks again for reminding me of the needed div. Setting Style=width:100% will allow Google to dynamically place various ad sizes to maximize revenue.
 

Andy

Administrator
Staff member
The problem is you really can't use a div larger than 500px because on medium sized devices like tablets the AdSense will be shown on a new line. Smaller AdSense ads which are 500px earn less revenue.
 

RC

Well-Known Member
The problem is you really can't use a div larger than 500px because on medium sized devices like tablets the AdSense will be shown on a new line. Smaller AdSense ads which are 500px earn less revenue.
New line is expected/desired for me. A bigger problem is Container header is not responsive, so will simply not show on smaller devices.
 

RC

Well-Known Member
Yet another reason not to put the AdSense in the header.
From looking at the two largest Disney XF forums, the consensus is putting ads above breadcrumb in header and footer. Both are responsive.
 
Top