Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
JohnCourt Posted August 11, 2023 Posted August 11, 2023 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!
Randy Calvert Posted August 11, 2023 Posted August 11, 2023 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. David N. and JohnCourt 2
JohnCourt Posted August 11, 2023 Author Posted August 11, 2023 Thanks Randy, so my technique is good? I thought for sure I had it jacked up.
Randy Calvert Posted August 11, 2023 Posted August 11, 2023 (edited) 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 August 11, 2023 by Randy Calvert JohnCourt 1
David N. Posted August 11, 2023 Posted August 11, 2023 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. JohnCourt 1
JohnCourt Posted August 11, 2023 Author Posted August 11, 2023 This has been very helpful, thanks guys! I am trying to use individual ads placement, manually.
Randy Calvert Posted August 11, 2023 Posted August 11, 2023 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:  JohnCourt 1
JohnCourt Posted August 11, 2023 Author Posted August 11, 2023 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.
Jim M Posted August 11, 2023 Posted August 11, 2023 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. JohnCourt 1
JohnCourt Posted August 11, 2023 Author Posted August 11, 2023 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 😂
Recommended Posts