Official Advertising / Ad Plugin for Discourse

Is there any possibility to show adsense ads inside posts content in random spots on posts content? On my site, most topics and posts are very long and detailed e.g like

hence the CTR of ads is very poor because ads only show either on start of topic or at bottom when the long post ends, i want to also show ads inside my post content. can u add this feature in this plugin please?

Also, how do i show a sticky fixed 300x250 size ad on my right side bar of the topic page on desktop below the topic timeline/topic life line slider. I want to show a fixed sticky ad over there and the ad will stay visible when user scrolls down on topic page, same behaviour like that of the topic life line slider. Any thoughts please? You can see same bahaviour on this URL Hyperreal sucks - Blender and CG Discussions - Blender Artists Community please guide me how do i accomplish this? Hyperreal sucks - Blender and CG Discussions - Blender Artists Community

I can share the code we use on Blender Artists, but it’s not using AdSense. I’m not even sure if that will work, or if you’re allowed by AdSense to do that.


@bartv A working code example would be amazing… I am also not only using Google adsense I have a number of other ad programs or sometimes I want to promote my own site topics in sidebars.

So, yes, please share with me your code and also with instructions where do I put that code to achieve that functionality. I should be able to add any html code in that space and it should fit over there in responsive side bar like it fits on your site. and it should stay visible when users are scrolling down on topics.

Are you also showing the same on mobile view on single topic page?

Ok I’ll DM you some code as it’s off-topic here. It does not work on mobile.

I am seeing a bug in Discourse, if i turn on my Google Vignette Ads via Google Auto ads, and i navigate from 1 topic to another, the Google Vignette ad show but i get this warning in JS console,

and the page navigates to the new topic, hence user never had the change to click the ad.
Deprecation notice: Removing all event listeners at once is deprecated, please remove each listener individually. You can see this behaviour on any topic How to Prevent Overspending? - How To Discuss and try to goto a new topic, you will see this warning.

Can anyone help me resolve this problem?

That doesn’t seem to be a major issue, just a deprecation warning. It looks like it’s associated with the Who’s Online Plugin (discourse-whos-online) which will be undergoing a rewrite at some point.


What do I do for this part?

Apologies if this is slightly off-topic, but may be relevant for others who are using this plugin.

Has anyone managed to give access to the AdSense googlebot crawler to a Discourse installation that is using SSO? I have run out of ideas of how to make this happen and would like to exchange some thoughts.

Right now, this seems to be hard if not impossible when using SSO, making AdSense work less effectively on pages that can’t be accessed by the crawler (without a login).

enabled, but where are the options?

Search for content security policy instead of CSP.


Hi, do I need to add the ads.txt file at the root of my site or putting its content in my sites settings like you describe is enough for Google Adsense? Because Google Adsense keeps asking me to copy this file at my site root, which I do not know ho to do… Thanks.

Hey there,
I am trying to add an additional 1200x300 banner dimensions for one of my banners on desktop, so when setting “dfp topic list top ad sizes” I have added 1200*300 as the dimension, but that does not seem enough for it to work.

Should I add this new dimensions somewhere else?

Thanks a lot

ads.txt must be in the root directory of your web application.

In other words, it must be accessible here:




We’re using this plugin to show adsense ads on different places of the site for all guests and users below TL1 - that works fine so far.

We now want to add house ads to the game and noticed that while no adsense ads are shown to the User At or above TL1 also no house ads were shown.

It looks like the only chance to show them house ads is to mix the house ads into the adsense ads using the “house ads frequency” parameter. This doesn’t sound very straight forward and I’m not sure if it’s a bug.

Is there any way around this? I’d prefer to show house ads to everyone not within the range of Trust level set for adsense ads.

Thanks for helping

We are using Adsense and we set 728x90 ads for desktop and 300x100 fixed for mobile. They are two different tags. Desktop works fine, but mobile serves big square ads which are almost half the screen. So, do we miss something during the setup?

Also, how admins can see ads too? adsense through trust level is set to 4.


1 Like

I have a problem with this setting: no ads for groups. It’s not working for me.

I activated the setting not to show ads to users belonging to certain groups. Added the user to the group. Nevertheless ads are shown. I cleaned cache and logout. It didn’t help me.

May be my css code influences? I don’t believe in it, because the plugin’ rules should work before the page is rendered and css rules applied. In my css I set what ads to hide and to show within some categories.

Hi Discourse Team,

Is it possible to hide the “advertising” tag and empty space when a user is detected that is using AdBlock? That would be a nice UX improvement as right now when a user visits the forum with AdBlock there is a large gap visible.

Also, when using the strict-dynamic tag in the CSP settings it made my entire discourse forum stop loading, is unsafe-inline recommended to use in a production site?



Thanks for this runs well on my website.

1 Like

Is it recommended or viable to use the “House Ads” functionality for other ad networks? (, Adversal, etc).

Or is there a “better way” of doing this, knowing that the plugin is built for specific networks. (Would like to avoid Ad Manager).

1 Like

Hi all, how are you ? I have installed Discourse in a self-hosted server and I’m getting stuck on configure Discourse Ad Official Plugin (GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum).

When I load any pages of my website I got a Javascript error telling me that “Access has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

Javascript error

I’ve enable Content Security Police

I’ve set content security policy script src:

  • https ://
  • http ://
  • https ://
  • https ://
  • https ://
  • https ://

I’ve set the cors origins:

  • https ://
  • http ://
  • https ://
  • https ://

I’ve been stuck trying to configure it for a days.

Could somebody help me please?

Thank you!