XF 2.0 Adsese

When you sign up for an Adsense account it asks for this to be pasted in to the forum

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-8644111871674343",
enable_page_level_ads: true
});
</script>

Is this already present or do I have to add this in manually for every single page ?

I would have though there was an easier way to insert this code without making major template changes.
 
I've tested the Auto ads and was not very happy with the results. In my case the ads were place between the main navigation bar and the sub-navigation bar. I suggest you get the Google AdSense responsive code instead. Then use the XenForo Advertising function to place the ad exactly where you want.

Admin control panel -> Setup -> Advertising

Another option is to use this add-on:

https://xenforo.com/community/resources/ad-manager.6347/
 
I've tested the Auto ads and was not very happy with the results. In my case the ads were place between the main navigation bar and the sub-navigation bar. I suggest you get the Google AdSense responsive code instead. Then use the XenForo Advertising function to place the ad exactly where you want.

Admin control panel -> Setup -> Advertising

Another option is to use this add-on:

https://xenforo.com/community/resources/ad-manager.6347/

AdSense sent me this, why cant anyone tell me where the code should be !?

As mentioned in our welcome email, we conduct a second review of your AdSense application once AdSense code is placed on your site(s). As a result of this review, we have disapproved your account for the following violation(s):

We did not approve your application for the reasons listed below:


Domain ownership: To complete the AdSense approval process, you need to connect your site to AdSense. It’s so we can confirm you're that the owner of the site and that your site meets the AdSense policies. To connect your site https://reptilezone.net, copy the code from your AdSense homepage and paste it into the HTML of your site right after the <head> tag. Make sure that you place the code on a page that receives traffic.

Find out how to connect your site to AdSense.
 
@captainmatt29 I can't see the code on your website. Did you edit the template within the default theme that guests are viewing on your forum?

That's my point, I see zero instructions on where to put it .... as someone new to XF I find it very difficult to do something when nobody has offered how to do it and doing google searches regularly gives me nothing even the add ons don't give you any clue.
 
Hi @captainmatt29 I see it now but you have the code twice.

You need to take the duplicate code out of page_container, as the location where you placed it is at the end which is outside of the <html> tags which will cause issues later. If you're placing it in page_container it needs to be just before </head> as per Google's instructions.

For now just revert the change you made in page_container, and leave it in google_analytics - you should be good to go then.
 
Back
Top Bottom