AdSense ads not displaying after updating to v2.4.0.beta4

All ad slots are blank, but do show the ADVERTISEMENT text. Nothing else was changed with Discourse except for rebuilding the app. There were no changes to the AdSense account. There are no error messages or policy violations listed on the AdSense account. The last time the app was rebuilt was August 11.

I noticed the official Ad Plugin faq was last edited 15 days ago, so I tried the CSP settings shown in the most recent change, but this doesn’t seem to have had any effect.

I know that’s not a lot of information to troubleshoot with, but that’s all I have and I’m completely stumped at this point. I’m not even sure where else to look. Any pointers or suggestions would be greatly appreciated.

3 Likes

Are there any warnings or errors in your browser’s javascript console? Do you have an ad blocker extension installed in your browser?

1 Like

I’ve checked the site with multiple devices with and without ad blockers. The AdSense account has had $0.00 earnings for the past 2 days so I assume nobody is seeing ads.

There is this warning in the console:

The resource https://pagead2.googlesyndication.com/pagead/js/r20190905/r20190131/show_ads_impl.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

I googled that yesterday and didn’t find anything useful.

1 Like

Did you find some fix? The exact same issue is appearing on my domain. Ads are blank now. Although adsense is reporting pageviews. But there are not clicks being recorded. Because ads are blank.

1 Like

Me too with same problem in topic view all ad slots.

We have the same problem

I can see a 403 error coming back from adsense in one request.

Is this happening on your sites too?

2 Likes

Here’s what I’m getting

That looks like it’s working then. Can you share the address of your site so I can look?

To be clear, you’re all saying that you upgraded to v2.4.0.beta4 and your AdSense ads stopped showing?

I’m not sure if this is helpful, but we’re on v2.4.0beta4 and AdSense is working fine. Are you sure there’s no issue with your account?

We use discourse-adplugin with responsive ads.

1 Like

Is this the AdSense plugin or the Official Ad Plugin? Show your plugin list please.

Also @smrtey check your AdSense settings because something looks wrong. Did you set the size to “responsive”? Or remove all sizes?

I’m not the ad guy or the guy who did the upgrade, so I’ll try to get him to come here with more info, but he says

nothing has changed anywhere, either here or with the AdSense account. There are no errors or problems reported either, here or there.

I did update the forum software this morning, but the only thing in that which could possibly have an effect also hasn’t changed. And nobody else has complained about anything on the Discourse forum.

So from this it looks like there is no list top ad size selected, which wasn’t the case before the update. I will fix this and try again. But there was a mobile leaderboard ad selected that was not displaying

image

will update if we get ads

2 Likes

Thanks for the details @smrtey.

I confirmed that this will cause the ad unit to fail to load because of the “NaN” width and height. I added a fix to handle that better. For AdSense it will default to responsive. Update the discourse-adplugin to get the fix, and/or add the size you want.

6 Likes

Can confirm that setting an ad unit size in AdSense and then setting the same size in Discourse solves the problem. Thanks for the help!

1 Like

@neil

I check and nth ad slot not show adsense code. This error seems to come from Google when Google Adsense only shows the first time.

In some pages, at first Adsense will not display, but when reloading Adsense will display.

Exp:

  1. Homepage: Always show: https://babyforex.net/

  2. Topic Pages: Show or not: https://babyforex.net/t/trung-quoc-da-bo-sung-gan-100-tan-vang-vao-tru-luong/230

  3. Topic show when I reload (do not show in the first time load): JPMorgan Chase thiết lập chỉ số Volfefe Index đo ảnh hưởng tweet của Trump - Cafe Forex - BABY FOREX

  4. nth ad slot not show: https://babyforex.net/t/babyforex-signals-journals/195

This means that Google will decide when ads will be shown.

Nth Ad Slot does not insert code

Adsense will not show with topic use Category Lock Down Plugin. Advertise activity in a private category (discourse-category-lockdown)

I guess it’s because Google can’t crawl those topics. You should add the categories to the " no ads for categories" setting (Admin > Settings > Ad Plugin).

Yes. If you can define some fallback ads to show by default, you should do so. I know you can do this in Ad Manager.

3 Likes