PhocaGAE/CustHtmlAdSense

General questions relating to Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
g00se
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Nov 04, 2023 1:32 pm

PhocaGAE/CustHtmlAdSense

Post by g00se » Sun Apr 07, 2024 1:52 pm

I'm trying to display Google AdSense ads with either of:

Image

But in neither case is any ad code getting inserted. Not sure where to start to sort this out...

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9913
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: PhocaGAE/CustHtmlAdSense

Post by AMurray » Sun Apr 07, 2024 9:54 pm

Did you add the AdSense script link in the <Head> section of the template? https://extensions.joomla.org/extension/phoca-gae/ suggests an easy way of doing that is using Phoca Site Plugin (linked from the above JED listing) to add the <script> line into the <head> section.

I can't find any mention of "custHtmlAdSense" on the JED. That plugin is disabled, so what's why it's not working...?
Regards - A Murray
General Support Moderator

g00se
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Nov 04, 2023 1:32 pm

Re: PhocaGAE/CustHtmlAdSense

Post by g00se » Mon Apr 08, 2024 11:46 am

Thanks for responding. The documentation for the Phoca plugin I'm using is HERE. The documentation states that there's nothing to it other than pasting the Google code into the editor field (which is kind of what you'd expect from a plugin), which I did.

User avatar
Nidzo2203
Joomla! Explorer
Joomla! Explorer
Posts: 325
Joined: Sat Nov 21, 2009 4:52 pm
Contact:

Re: PhocaGAE/CustHtmlAdSense

Post by Nidzo2203 » Mon Apr 08, 2024 4:07 pm

One silly question but do you have ad blocker installed in your browser?

gws
Joomla! Champion
Joomla! Champion
Posts: 6056
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: PhocaGAE/CustHtmlAdSense

Post by gws » Mon Apr 08, 2024 4:17 pm

+1 @Nidzo2203 that caught me out a few years back...

g00se
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Nov 04, 2023 1:32 pm

Re: PhocaGAE/CustHtmlAdSense

Post by g00se » Mon Apr 08, 2024 4:18 pm

You're wise and right to ask that question. I have both adblocking at the router and as a browser plugin. Both are disabled. I just went for the nuclear option and disabled the editor and pasted the AdSense code directly into an article. It 'showed' in the sense that the code was in the source. It simply messed up my menu and no ad appeared. Even if it *had* worked, it wouldn't be a practicable solution to insert it manually into every article
FYI, the AdSense code is:

Code: Select all

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2907516899218654"
     crossorigin="anonymous"></script>
<!-- TJ-Ads-01 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxxxx"
     data-ad-slot="yyyyyyyyy"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
I guess I could simply try to use a plugin that would allow the insertion of such a piece of code. Do you know of any?

gws
Joomla! Champion
Joomla! Champion
Posts: 6056
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: PhocaGAE/CustHtmlAdSense

Post by gws » Mon Apr 08, 2024 4:40 pm

You could try a module.

g00se
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Sat Nov 04, 2023 1:32 pm

Re: PhocaGAE/CustHtmlAdSense

Post by g00se » Mon Apr 08, 2024 5:33 pm

You mentioned one was disabled. I've just enabled it with new AdSense code and now it's working. Probably *too* well now, as a lot of the page has been taken over! I need to find a way to tone it down now ;)


Post Reply

Return to “General Questions/New to Joomla! 4.x”