Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Adsense and analytics code for php fusion 9

Hello,

I try to improve php version 9.03 on my site i make some contest make a new database beacuse migration isn't work and after some work now i want to put analytic code and adsense code on site but i can't make this.
I try to ad adsense in banners don't work, i try on a panel, don't work please help me to improve ads on site.
Google adsense is something like this;
CodeDownload  
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- muntii-apuseni -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-6561333551709177"
 data-ad-slot="3544258417"
 data-ad-format="auto"
 data-full-width-responsive="true"></ins>
<script>
 (adsbygoogle = window.adsbygoogle || []).push({});
</script>



Also i need seom help to modelate my header for my theme. i want to put in header a background image but i can;t make this.
If you run it like this, it can be added to any section you want.
CodeDownload  
echo '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- muntii-apuseni -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-6561333551709177"
 data-ad-slot="3544258417"
 data-ad-format="auto"
 data-full-width-responsive="true"></ins>
<script>
 (adsbygoogle = window.adsbygoogle || []).push({});
</script>';


Note for panels you need to enable Allow PHP Execution in Admin > Settings > Security.
Falk attached the following image:
allow_execution.png
I use that code but not show the advertisment in adsense in banners sections on administration system.

Where can i put my analytics code, i try to insert in Theme.php but isn't work the analytics code is:

CodeDownload  
echo '<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-22842335-1"></script>
<script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());

 gtag('config', 'UA-22842335-1');
</script>';



Please tell me where must to be insert for count all site pages and section.
On php 7 i make any modification my self but in 9 i see that is differit and i can't make them...
Banner does not allow scripting since 7.02.07.

add the stats to includesfooter_includes.php
Fixed code,
CodeDownload  
echo "<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src='https://www.googletagmanager.com/gtag/js?id=UA-22842335-1'></script>
<script>
 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());

 gtag('config', 'UA-22842335-1');
</script>";

I post a new reply here with 3 problems, but i see that isn't alow, please tell me why?
I must to make a new Thread for this?
Thanks very much, and sorry!
I am not very familiar with v9 and this is the reason.
Thread Information
Author
Replies
7 posts
Views
114 times
Last Post
Last updated on 2 months ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, danyab