Advertising Plugin for Discourse - Serve Ads on your Discourse Forum (Official Endorsed)


(Dmitry Demenchuk) #41

if you show us adsense publisher code it will help us to understand the problem. It’s not a secret information.

(Dmitry Demenchuk) #42

How can I hide ADVERTISEMENT word above an advert?

(Felix Freiberger) #43

Please note that depending on your jurisdiction, removing this note might be illegal.

(Dmitry Demenchuk) #44

Can you make it optional then? Because for example in UK, it’s totally fine to show adverts as they are.

(Rafael dos Santos Silva) #45

I guess people who doesn’t want it can use CSS to hide.

(Dmitry Demenchuk) #46

Well, I can… I can also overload /plugins/discourse-adplugin/assets/javascripts/discourse/templates/components/*.hbs files, but it would be better to have a possibility to disable it without hacks.

(Leah Kramer) #47

In case this is helpful to anyone else – I was having trouble getting my ads to show up. I kept getting the DFP error “ad unit failed to fetch” and the ad unit showed up blank.

I scrutinized the ad tags forever thinking that must be the problem and then realized that I had put in the wrong value for the Publisher ID.

At the top of your DFP screen there is a string like so:

I thought the ca-pub… was the Publisher ID but it turns out the plugin needs the number in the parenthesis instead.

Hope this helps save someone some time!

Showing ad by Discourse Advertising Plugin
(Leah Kramer) #48

Another glitch that drove me batty for hours today. I’m sure this is a DFP issue and not with this plugin. Anyway, I couldn’t get the 320x50 mobile unit to show up. DFP tags were coming up fine, no errors in the DFP Debug Console. So eventually in DFP I chose to test the ad unit on mobile and it presented a QR code which I snapped with my phone and tested the ad, it came up fine, and then instantaneously the ad started show up in Discourse. It’s like it needed some sort of jump start.

A related little “gotcha” with this plugin is as follows: Take an ad slot such as “above topics”. You have to set the mobile-ad-code for that slot AND the non-mobile-ad-code for that slot or the mobile-ad-code won’t show up at all. It’s sort of like the mobile-ad-code is a “backup” for the non-mobile-ad-code.

(BV4WOLF) #49

@ladydanger Can you help to check with the dfp ad? It doesn’t show anything on my site. :frowning:

(BV4WOLF) #50

I used the dfp console to troubleshoot and the result is all thing corrected, but on my discourse site still doesn’t show ad.

(BV4WOLF) #51

Just for banner only (readme instruction)

(Neil Lalonde) #52

FYI I fixed this bug recently, so you aren’t required to define an ad unit for both desktop and mobile.

Also some important fixes for AdSense:

  • If publisher id is missing but ad units are defined, don’t show blank ad slots. (was a bug for DFP too)
  • Don’t load adsbygoogle.js when adsense publisher id isn’t set
  • AdSense ads weren’t loading on initial page load.
  • Don’t reload adsbygoogle.js on every ad unit render.

(Kenny DuBose) #53

Forgive me if it’s obvious (I did look around), but where may I discover the number of the latest version of the official Adsense plugin?

(Por) #55

I signed up for Adsense. Only problem is I have waited for a while and I am not sure I did it the right way.
I have pasted the code (AdSense want me to paste a code) I got from Adsense (so they can review it) in the “Top” (this is in Custom/CSS/HTML settings) and I added the Adsense code as well in settings.

It says this on Adsense:
Reviewing your site will take up to 3 days. We’ll email you when we’re done.
Paste it into the HTML of, right after the tag.

Anybody can help please?

See here:

(Ladydanger) #56

hey ked, you’ve probably already found it now seeing as my reply is late but you can find the version number here: GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum on the readme.

(Ladydanger) #57

Hey Por,

You don’t need to paste the code that Adsense wants you to paste because most of it is incorporated in the plugin anyway. You just have to extract the ca-pub number and the ad-slot number that’s in the code that adsense provides you. Just check out the read me in here: GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum

It does take a while for adsense to ok your site before they start serving ads - for mine I think it was around a week or more before ads started appearing.

Hope all goes well!

(Por) #58


Thank you for sending a reply to me.

Here is a picture what I see on my adsense:

In the ReadMe file you pointed me to it says I have to add other things in the picture that I don’t have, I just have the code I posted above:

What can I do then? Do I just input the publisher code and wait then because I have no other code yet (I can’t create any ads yet on the AdSense page)?

(Kenny DuBose) #59

@ladydanger, thank you!

(Neil Lalonde) #60

Aren’t you asking the same thing that I answered here?

If AdSense hasn’t approved your domain, then you need to get that done first. Then you create ad units and enter their ids in the Discourse settings.

(Por) #61


I got the e-mail saying “Welcome to Adsense” and it says that I was approved, but when I log in it says they are reviewing my site. It is strange that they are reviewing my site if I was approved, the e-mail I got even said I can start creating ad units but when I log in I can’t create anything.