Adsense not displaying ads in adplugin?


(Maahi) #1

Adplugin not working as expected, adsense ads are not getting displayed. Is there a bug? Or any fixes?


(Jeff Atwood) #2

which plugin are you referring to and what are your settings?


(Maahi) #3

discourse-adplugin 1.0.2

for example you can see above the post “Advertisement” but there is no ads displayed.

http://www.myphoneforum.com/t/ipad-pro-vs-ipad-air-a-brief-specs-check/35


(Jeff Atwood) #4

Are you using any third-party plugins? Many if not most of them are broken in current 1.5 and 1.6 betas, so I suggest removing them. And their broken-ness can break the whole site and other plugins, too.


(Maahi) #5

Yes there are many broken plugins… I will remove them, could you please give a article for removing plugins, thanks.

Maahi


(cpradio) #6

Edit your app.yml, remove the lines containing the broken plugins (or put a # at the beginning of that line) and run ./launcher rebuild app


(Maahi) #7

Thanks CH &cpradio…

Will do…


(Maahi) #8

Hi,

I removed all other plugins and few others are displayed in the console like “Poll” “LazyYT” but not visible in app.yml

Are these supposed to be removed ? (I am using the docker from Digital ocean 1 click apps)

There was also an update issue in the past… it says I am up to date, but it was not…

Below are my AD settings both Amazon and Adsense ads fail to display…

Adsense

Your help is much appreciated.

Maahi

www.myphoneforum.com


(Mittineague) #9

discourse-details, lazyYT and poll are “official” plugins that come with Discourse.
They should be OK since the Discourse team has to some extent taken responsibilty for them.

Not that they will never cause a problem or that no one can contribute to them, just that it is much more reasonable to assume they are not a problem.

I have no experience with the adsense plugin, but are you sure the src code input needs script tags?


(Maahi) #10

The first one in screenshot is the amazon section of discourse ad-plugin and it asks for source code,

The second screenshot asks to enter ad id…

Let me know if its not the way to do it… ?


#11

Having the same issue here. I removed the Google Adsense plugin which has always worked flawlessly and installed the adplugin after the update.

The only other plugin I have still installed is the tagging plugin - which if I remember correctly is now a part of the standard feature set of discourse. I’ve always been afraid to remove it because all has been working fine.

So, to get this plugin working and displaying ads appropriately should I just remove the tagging plugin and rebuild? Would there be any negative consequences to my tags for doing this?


(Neil Lalonde) #12

@ezworldwide Even though you have the tagging plugin installed, Discourse is not loading it anymore. So you can safely remove it the next time you upgrade. There’s no rush because you’re already not using it.

Also, after moving to the official adplugin, did you re-enter your AdSense settings? I’m pretty sure that they don’t all carry over from one plugin to the other.


#13

@Neil - I don’t have access to SSH right now but will later and will delete the tagging plugin and rebuild. Thanks for the help on that.

When I removed the Adsense plugin I did a rebuild. I then installed the Adplugin and did a rebuild. Once that was complete, I did re-enter all of the Google Adsense information manually and made new ads for the mobile configuration, which I did not need with the previous Google Adsense plugin. I get the same result on desktop and mobile. I can force the ads to display if I refresh the page a few times and then go back to the homepage. The ads do not display unless I take this step which is strange. I have tested this on Android Chrome/iOS Safari, on PC in Chrome/Firefox/Edge, and on Mac in Safari/Chrome/Firefox. All the same result.

Oh - and I have the trust level set to zero. I don’t show ads to anyone who is logged in. Not sure if that is relevant or not, just thought I’d include it.


(Neil Lalonde) #14

Hmm that doesn’t sound like the same problem “adsense ads are not getting displayed”. What is your site so I can see for myself?


#15

Sure - sorry for the delay.

Here you go.


(Neil Lalonde) #16

I see the problem and am working on the fix.

EDIT: @ezworldwide The fix is done. Give it a try when you can and let me know if it works for you.

https://github.com/discourse/discourse-adplugin/commit/620404ab9ef098799d5bd825a963ec42d2892b76


#17

Thanks! Just to make sure I do it correctly.

  1. git pull
  2. rebuild

Correct?


(Neil Lalonde) #18

I recommend installing the Docker Manager plugin so you can do upgrades in a browser. But yes, you can do a rebuild and it will pull the latest adplugin code too.