Google Ads not showing

We have subdomain websites as well, the main - called Dewalist.com.

We already set up Google Adsense, and working well with the main site and one of the subdomains. But it didn’t work with this website: ask.dewalist.com, where the Discourse web app is.

We already configured the Adsense Publisher code and the ad unit.

It came up with ADVERTISING text, but no advertising showed up. We checked the view source code, which has the right PUB and ad unit id.

Any ideas?

We are appreciated your feedback.

Content Security Policy: The page’s settings blocked the loading of a resource at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (“script-src”).

Hi @RGJ

Thanks for the input. Can you elaborate on this, please? What do we need to do?

Thanks

We researched further on this.

Regarding this CSP, it looks like we need to add this on app.yml under env section:

DISCOURSE_CSP_DIRECTIVES: "default-src 'self' https://pagead2.googlesyndication.com"

We added this, rebuilt the app, restarted the app and still not working.

Any other ideas?

Don’t use CSP or let it only reports?

Hi Jakke

Can you elaborate on this, please?

Thank you

Don’t use setting content security policy Use setting content security policy report only instead, if CORS is hiding ads.

OK. I just ticked that now:

content security policy report only

Still not working. Do I need to remove CSP?

I was going to have another look for you but ads are showing, so better not touch anything anymore :wink:

I think Jakke’s suggestion worked well.

I might remove the CSP from app.yml stuff