XF 2.2 Adsense code

OldCoals

Active member
Could somebody please clarify what Adsense code is required in able to order ads.

I have created my account with Google and the following code has been given:

<script data-ad-client="ca-pub-xxxxxxxxxxxxxxxx" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

When I search these forums I see that others have used :

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:100%;height:90px" data-ad-client="ca-pub-5226777900814566" data-ad-slot="InsetYourSlotNumberHere"> </ins> <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>

Am I using the right code?
 

djbaxter

in memoriam 1947-2022
The first code goes in your head section. Edit your PAGE_CONTAINER and insert it just before the closing / head tag.

The second code goes where you you want the code to display. Most people probably use the section in AdminCP >> Setup >> Advertising for this.
 
Top