Google Adsense not displaying on members only pages

JoyFreak

Well-known member
See attached image of Google ads not displaying on members only pages. Is there a setting I am missing or anything I could do?
 

Attachments

  • this.webp
    this.webp
    11.7 KB · Views: 37
I think this the expected and normal behavior. If Google's robot can't see your content, it can't determine what ads to serve. You should not display ads on pages that have no content, or content that Google can't access.
 
I think this the expected and normal behavior. If Google's robot can't see your content, it can't determine what ads to serve. You should not display ads on pages that have no content, or content that Google can't access.
No. Ads will display on member's only pages but it may depend on where you've inserted the code.

@JoyFreak, where is the ad script inserted?
 
1. Are you using Google Auto Ads?

2. Can you post the code you inserted (just obfuscate your AdSense number)?

3. Or give me admin access in a PM and send me the code...
 
1. Are you using Google Auto Ads?

2. Can you post the code you inserted (just obfuscate your AdSense number)?

3. Or give me admin access in a PM and send me the code...
I am using "Ad units" > "Display ads" and this is the code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- XF-Ads -->
<ins class="adsbygoogle"
style="display:block;margin: 0 auto;"
data-ad-client="ca-pub-xxxxxxxx"
data-ad-slot="xxxxxxx"
data-ad-format="horizontal"
data-full-width-responsive="false"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
 
1. Try moving
Code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
to PAGE_CONTAINER. That will also help with ad load speeds.

2. Change
data-full-width-responsive="false">
Code:
data-full-width-responsive="false">
to
data-full-width-responsive="false">
Code:
data-full-width-responsive="true">

3. Create a text file called ads.txt with the following contents:
Code:
google.com, pub-{YOUR GOOGLE PUB NUMBER}, DIRECT, f08c47fec0942fa0
Upload this to the root of your forum.

See if that helps.
 
1. Try moving
Code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
to PAGE_CONTAINER. That will also help with ad load speeds.

2. Change
data-full-width-responsive="false">
Code:
data-full-width-responsive="false">
to
data-full-width-responsive="false">
Code:
data-full-width-responsive="true">

3. Create a text file called ads.txt with the following contents:
Code:
google.com, pub-{YOUR GOOGLE PUB NUMBER}, DIRECT, f08c47fec0942fa0
Upload this to the root of your forum.

See if that helps.
Can code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Sit anywhere in PAGE_CONTAINER ? I've put it right at the bottom of the template.

Done everything else too but my ads weren't showing anymore since two days ago so I removed the whole lot. Still isn't showing.

Also, Should I use auto ads code or is the code I have above OK to use from "Ad units" > "Display ads" ?
 
When Auto Ads first came out they were awful but I'm using it now. Basically, you keep the same ad code before and add in the auto ads code as well - this also goes in the PAGE_CONTAINER template.

The reason your ads stopped showing is probably because you didn't have an ads.txt file. Google now requires this.
 
When Auto Ads first came out they were awful but I'm using it now. Basically, you keep the same ad code before and add in the auto ads code as well - this also goes in the PAGE_CONTAINER template.

The reason your ads stopped showing is probably because you didn't have an ads.txt file. Google now requires this.
So the auto ads code goes anywhere in the page container?

I have ads.txt with those contents in already. My ads stopped showing two days ago randomly and no messages in the adsense console. I removed it again as it's too much hassle for what it's worth.
 
to PAGE_CONTAINER. That will also help with ad load speeds.
Shouldn't that be helper_js_global? I thought that was the best place for XF 2 to add external JS.
Put the "<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>" part below "<!--XF:JS-->"
Anyway it won't solve the problem for JoyFreak, you can load the javascript anywhere.

The reason your ads stopped showing is probably because you didn't have an ads.txt file. Google now requires this.
Do you have a link to any articles confirming this? As far as I know ads.txt is absolutely not a requirement, they would sure have notified you in the admin panel if something was missing. I'm not using it as it can only break things for now.

@JoyFreak, if you are using the default ad code and nothing is displayed, you should probably contact Google Adsense and ask for help. Looks like your ad code is fine but Google isn't filling the spaces. They might be blocking it some how.
 
Last edited:
Do you have a link to any articles confirming this? As far as I know ads.txt is absolutely not a requirement, they would sure have notified you in the admin panel if something was missing. I'm not using it as it can only break things for now.

They notified my on the Adsense accounts page. It's possible it's something they're rolling out or associated only with Auto Ads but I checked because my ads stopped displaying.

@JoyFreak Note that after you make any changes it does take a couple o0f hours or more before the ads start displaying again.
 
They notified my on the Adsense accounts page. It's possible it's something they're rolling out or associated only with Auto Ads but I checked because my ads stopped displaying.

@JoyFreak Note that after you make any changes it does take a couple o0f hours or more before the ads start displaying again.
Oh ok, I’ll try again tomorrow then. Thanks guys
 
Shouldn't that be helper_js_global? I thought that was the best place for XF 2 to add external JS.
Put the "<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>" part below "<!--XF:JS-->"

Anyway it won't solve the problem for JoyFreak, you can load the javascript anywhere.


Do you have a link to any articles confirming this? As far as I know ads.txt is absolutely not a requirement, they would sure have notified you in the admin panel if something was missing. I'm not using it as it can only break things for now.

@JoyFreak, if you are using the default ad code and nothing is displayed, you should probably contact Google Adsense and ask for help. Looks like your ad code is fine but Google isn't filling the spaces. They might be blocking it some how.
The above in bold was what fixed the issue I had here. Thanks for your help!
 
After the Adsense update my ads are not displaying on non-member pages again. Anyone having the same problem?
 
Back
Top Bottom