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.
Not a member yet? Click here to register.
Forgot Password?

Google AdSense Connection Problem

Asked Modified Viewed 970 times
A
alqutob
A
PHP-FUSION ARABIC SUPPORT
http://phpfusion-ar.xyz
 
  • Member, joined since
  • Contributed 96 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
asked
Member

I created a Google adsense account and I got the following 

Qutoe:

[list]
[*]Copy the code below
[*]Paste it into the HTML of http://yourdomain.com, between the <head> and </head> tags
[*]Tick the box and click Finished when you've completed it
[/list]
Your AdSense code
<script data-ad-client="ca-pub-xxx111222333xxxx" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

I made tried to insert this code everywhere I thought it may work but with no use.
I tried to creat a panel with some help of previous old articles, but did not succeed .
So can we get some help from the developers by creating a plugin or a module for this important script?
Thank you
 
Edited by alqutob on 28-09-2020 17:01,
0 replies

5 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

For Panels you need to enable PHP execution ( Admin > Security Settings ).

add_to_head('<script data-ad-client="ca-pub-xxx111222333xxxx" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');


In other places you also need to echo the code when put under PHP sections. If it is a new account Google can take some time before Ads starts to display since they determine the relevancy of ads before serving them.

Our Developers prefer that you create a new panel file instead and add it. Create a directory under Infusions called adsense_panel add a file in it called adsense_panel.php
<?php
defined('IN_FUSION') || exit;
add_to_head('<script data-ad-client="ca-pub-xxx111222333xxxx" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');


Save, and go to Panel Admin and add this newly created panel and enable it.
 
Edited by Falk on 29-09-2020 09:25,
0 replies
— 1 month later —
A
alqutob
A
PHP-FUSION ARABIC SUPPORT
http://phpfusion-ar.xyz
 
  • Member, joined since
  • Contributed 96 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
answered
Member

I created adsense_panel.php and created a panel and enabled PHP execution
but the ads did not appear on my site which was activated by google
This is the file content
=====================
<?php
defined('IN_FUSION') || exit;
add_to_head('<script data-ad-client="pub-xxx1234567890xxx" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>');
=====================
Any idea ?
Thank you
Edited by Falk on 10-11-2020 07:41,
1 reply
A
alqutob
A
PHP-FUSION ARABIC SUPPORT
http://phpfusion-ar.xyz
 
  • Member, joined since
  • Contributed 96 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
answered
Member

Sorry ...
What do you mean by (Try to just echo it.)
Do you mean to delete the panel and disable PHP execution?

Please , clearify
 
Edited by Falk on 12-12-2020 18:52,
1 reply
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Do not use double quotes for javascript in PHP echo instruction.

So use: echo"<script data-ad-client = 'pub .....
 
Edited by Falk on 10-11-2020 17:02,
1 reply
A
alqutob
A
PHP-FUSION ARABIC SUPPORT
http://phpfusion-ar.xyz
 
  • Member, joined since
  • Contributed 96 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions
answered
Member

Yes ,  exactly ... the adsense is working now on my site.
It worked through the adsense panel and I put the code in the theme_functions_include.php file.
Thank you very much All
Edited by Falk on 11-11-2020 06:57,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 5 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
D
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
A
A
PHP-FUSION ARABIC SUPPORT
http://phpfusion-ar.xyz
 
  • Member, joined since
  • Contributed 96 posts on the community forums.
  • Started 39 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet