Jump to content

Featured Replies

Posted

Thank you in advance folks.

So I have met all the qualifications and approvals by Google Adsense, and have my ads.txt in the root of my domain, and I copy pasted the code supplied by Adsense into the head tags of my "globalTemplate" file, thanks for all your help with that @David N.

I have read the Adsense help topics and it seems pretty convoluted for my simple mind and I am struggling with placing the actual AD code into a location on my website to display the Ad. It is script code, and I would like to create a block with the advertisement code in that block, and place the custom block in my community to display the ad.

I copy paste the code provided by Adsense into my custom block, and when I place my block, nothing ever appears.

This is what I am trying to place:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xxxxxxxxxxxxxxxx"
     crossorigin="anonymous"></script>
<!-- Forum Page Sidebar -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxx"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>

Do I need to add anything before or after the script code for the ad to appear?

Thanks for any help!

  • Community Expert

Two things… once you add the code you might need to clear the system cache for changes to show. View the page source and see if the code is actually there.  If not, that problem must be resolved  

If the code is there,but no ad… Google may not immediately show ads. They many times start profiling traffic before they deliver an actual ad. If that’s the case, the problem is with Google. 

  • Author

Thanks Randy, so my technique is good? I thought for sure I had it jacked up.

  • Community Expert
This post was recognized by Marc!

Randy Calvert was awarded the badge 'Helpful' and 5 points.

If you are using the auto ad code, do not put it in a block. Blocks don’t render in the header. You add the code to your site theme’s global template in the head section. 

Once it’s added to the theme, you need to make sure the code is showing when you view source. If not, it’s most likely cached to the old version still. If the code is actually there but not showing ads it’s a Google issue. 

If you are NOT using Google Auto Ads and are using manual ad blocks, just use the built in IPS advertising section of the ACP. (This only works with manual ads not auto ads.)

Edited by Randy Calvert

This post was recognized by Marc!

David N. was awarded the badge 'Helpful' and 5 points.

Are you trying to do auto ads, or individual ad units? 

The code for auto ads goes in the header, like this: https://support.google.com/adsense/answer/9274516

The code for individual ad units goes in the body, like this: https://support.google.com/adsense/answer/9190028

To check that you've added the code correctly, view the source: https://support.google.com/adsense/answer/9189018

Then you may have to wait a few hours before Google actually publishes ads on your site. 

  • Author

This has been very helpful, thanks guys! I am trying to use individual ads placement, manually.

  • Community Expert
30 minutes ago, JohnCourt said:

This has been very helpful, thanks guys! I am trying to use individual ads placement, manually.

If that’s the case, take a look at placing code per:

 

  • Author

Ok Randy and David, the code was working all this time, I tried Chrome and Edge and I can see the ads, but in firefox I cannot, I don't have any ad blocker software on my firefox browser, I don't know why they don't display in firefox, hmmm.

  • Community Expert
2 minutes ago, JohnCourt said:

Ok Randy and David, the code was working all this time, I tried Chrome and Edge and I can see the ads, but in firefox I cannot, I don't have any ad blocker software on my firefox browser, I don't know why they don't display in firefox, hmmm.

Perhaps FireFox's privacy settings is blocking something from Google which it requires to show ads. You would need to contact Google about that. Regardless, sounds like our software is serving your advertisement so you did set it up correctly.

  • Author
2 minutes ago, Jim M said:

Perhaps FireFox's privacy settings is blocking something from Google which it requires to show ads. You would need to contact Google about that. Regardless, sounds like our software is serving your advertisement so you did set it up correctly.

Looks like Jim. IP is fine. I get the hint though Jim, move on move on, it's not an IP issue 😂

  • 1 year later...

Hello, sorry to re open an old topic, but when I want to add my community in Adsense, it says that they do accept ony first level website (only http://invisionzone.com and not mycommunity.invisionzone.com). I tried with http://invisionzone.com and place the file ads.txt in a root page, without success, as expected.

How did you managed to get your community accepted in Adsense ?

Thanks a lot!

  • Community Expert

This is indeed a very very old topic. ads.txt is now added directly in the admin CP from System>Site Promotion>Advertisement Settings

On 5/23/2025 at 9:58 AM, Marc said:

This is indeed a very very old topic. ads.txt is now added directly in the admin CP from System>Site Promotion>Advertisement Settings

Marc, So we can just ad the ads.txt code into any of the advertisement spots?

Edited by tpasa

  • Community Expert
3 hours ago, tpasa said:

Marc, So we can just ad the ads.txt code into any of the advertisement spots?

There is a specific spot in the Advertisement Settings which you would place your robots.txt information.

On 5/28/2025 at 3:46 PM, Jim M said:

There is a specific spot in the Advertisement Settings which you would place your robots.txt information.

I think I found it but they say they can't see it.

  • Community Expert
1 hour ago, tpasa said:

I think I found it but they say they can't see it.

May need to give it a few for the cache to clear. I am able to see it just fine.

Recently Browsing 0

  • No registered users viewing this page.