Official Advertising / Ad Plugin for Discourse

Hi @neil
Yes, the URL is there in the SRC. I can find that.

But, Amazon no more gives us the iframe code (I checked in Google and I can see that previously they used to give both JS + iframe code).

Now, now, they are giving just the JS code.

So I think the plugin needs to be updated to allow JS code (I mean the JS url)

Please let me know if you have any questions.

I know almost nothing about the Amazon part of this plugin. But it seems like it only supports the ads that are iframes.

That isn’t true according to my account. It gives some banners as iframes and some aren’t. So I guess the intention of this plugin was to only support iframe amazon ads? In any case, maybe the Amazon part of this plugin needs to be rewritten or extracted into a new plugin.


I can’t find how to create Amazon iframe ads; every time I create one it’s of the ‘script’ type.

1 Like

Is it possible to change the ad alignment? Right now the ads appear on the right.


Apparently the ads are centered across the entire page width, which makes it look odd. I think it’s a matter of a bit of CSS, but I haven’t figured it out yet. Will post an update when I have a solution.


Here’s what I use to get the Ads to behave…

.google-adsense.adsense-post-bottom {
    padding: 0 52px;


We just built an additional advertising option into this plugin: CodeFund.

It was just merged into the core plugin. If any of you would like to try it out, please submit your info at and we can get you a property_id to go into the settings.

Please link me with any feedback on this part of the plugin.



Guys, i m getting Adsense iab tcf 2.1a errors,

Looks like Adsense ad code is triggered before a consent CMP can be made by the Quantcast

Can you guys do a fix on this plugin and update this?

I have also used Quantcast CMP solution but still adsense error is not going away.
@ladydanger @neil

Can anyone help?

The Quantcast CMP is not blocking JS code like others (try to) do automatically. You have to build the whole JS logic yourself (via callbacks of the IAB stub), as we did, but with DFP.


@Terrapop I m only just using Google adsense directly for now. Can you share with me any other best CMP better than Quantcast to achieve this automatically without moving to DFP? So that I can still use Adsense like I m using now and this error gets fixed automatically without me changing any adsense codes manually.

if not, please share some link of tutorial to move my Google adsense to DFP so that this IAB adsense errors goes away in my dashboard ? Also a tutorial for such JS logic with adsense on Discourse using this plugin ?

OneTrust may block automatically. Sharing a link for moving Adsense to DFP plus Prebid header bidding with the Quantcast CPM implementation is not available. It took us 3 weeks to get it working and it’s not a trivial task for non-developers. You have to understand the deep logic of all these tools before you’re able to merge them, and it’s an even more difficult task to get it working with a SPA like Discourse. And all of this is not working along the standard ad plugin here.

1 Like

okay terrapop.

You mentioned I have to write the custom JS logic myself to load the adsense header code, does that mean I have to remove my adsense publisher ID from this plugin settings page and invoke adsense header code directly in my site head tag manually ?

if that is the case are you guys not going to add this adsense eu consent or iab logic directly in your plugin so we guys dont have to do it manually ?

my point is what is the benefit of using this plugin when I have to load adsense manually on all pages via my site header… it would be very nice if you guys add a CMP option along side with this plugin or atleast add a way to block adsense codes from being rendered unless the user gives consent. to get rid of this adsense error.

Also Onetrust forced me to have a company email to use their service, do u have any other recommendation for a CMP tool which will block adsense tags automatically until use accepts or gives consents ?

I do not have any company email.

This plugin is not a viable option for a complex ad setup with DFP, header bidding, and an IAB CMP at this moment AFAIK, and I don’t have any other CMP recommendations, but maybe others have?

1 Like