Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Adsense Code

Aloittaja punchy, kesäkuu 08, 2019, 05:59:53 IP

« edellinen - seuraava »

punchy

Hi all  ;D

I need to add some adsense code between  the <head> and </head> tags on the front page of my forum what file can i do this with ?

This is the code

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


I tried putting it in the index template but got a 403 error syntax error

I need this code to add my adsense ads

Any help gratefully accepted

Kindred

You cannot just randomly paste code into a PHP file. You have to put it into an Echo, either one that exists are ready or creating a new 1 in the proper location.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

njtweb

Lainaus käyttäjältä: punchy - kesäkuu 08, 2019, 05:59:53 IP
Hi all  ;D

I need to add some adsense code between  the <head> and </head> tags on the front page of my forum what file can i do this with ?

This is the code

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


I tried putting it in the index template but got a 403 error syntax error

I need this code to add my adsense ads

Any help gratefully accepted

Use the adsense mod or install a portal. You can put the adsense code where ever you want with a portal.

Advertisement: