XF 2.0 Where to put the main adsense code

AndreaMarucci

Well-known member
I've got the site code from adsense
Code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({
          google_ad_client: "ca-pub-xxxxxxxxxxxxxxxxxx",
          enable_page_level_ads: true
     });
</script>
question is where and how to put it somewhere in the forum code without editing core files possibly...

thanks!
 

palhanow

Active member
There is a option on Admin CP.

Setup -> Advertising -> Add Advertising -> Choose the place (there is a lot of options) -> Paste the Code, set the criteria and done.

Very easy and no need to edit core.
 

AndreaMarucci

Well-known member
You're right and thanks for the info. What I've posted above is not the ad code but the code to connect my forum to adsense and this one should be put in <head> or something like that, not pasted in the ad section of site.

Am I wrong?
 

palhanow

Active member
Andrea, i don't think you need this AdSense code to connects your site with AdSense. I don't use anything like that on my Forum or in my Wordpress page, just the Ad Code, for real.

Just use the Ad Code on Advertisement option and you are all set for monetizing your Forum, because the Ad code contains everything that you need to run the Ad.

I run maybe 3 or 4 ads on my site and Forum and I don't remember to using anything like that.

Just don't forget they take some time to appear after the code is properlly set.

Please someone correct me if I'm wrong.
 
Top