Google AdSense plugin


(Piotr Szal) #41

maybe I misunderstand adsense.

I was thinking, that other people would like to use other or modified adsense code. Maybe code from DFP.
With this solution they have the option to use the predefined or his own.


(Surya Sasmita) #42

I am using this beginner guide ( real newbie on linux ) to install discourse. I am wondering if I can use this plugin on my installation. If yes, how do I switch to development mode?

I have created a snapshot just in case I broke my installation


(Michael - DiscourseHosting.com) #43

You don’t need to “switch to development mode”.
Here is how to install a plugin on Docker.

Maybe someone can add a link to this in the beginners guide, or even make a wiki of that.


(Surya Sasmita) #44

Thanks for the reference.

I’ve tried the tutorial there by editing the app.yml, adding this

git clone https://github.com/discoursehosting/discourse-adsense.git

after the docker_manager git clone, then I do this

./launcher stop app && ./launcher bootstrap app && ./launcher start app

but the adsense menu is not there. anything I missed?

update

I tried this

find /var type d -name "*adsense*" -print

and discourse-adsense existed

more update
got it, the Discourse-Adsense requirement is
Minimum Discourse version: v0.9.9.8
mine is 0.9.9.7


(Surya Sasmita) #45

I have now updated my discourse to version 0.9.9.8
run the command

/var/docker/launcher rebuild app

but Adsense menu still not added
anything I missed ?


(ljpp) #46

Allowing the user to paste in the code it would make the AdSense plugin work for most banner ad networks. The bigger the site, more likely it is that the webmasters use something other than AdSense.

Regarding the AJAX dilemma: I am no developer, but wouldn’t this kind of solution be simple to implement to the plugin itself?

http://www.devplumber.com/2013/11/26/dynamically-reload-google-adsense-ads-without-refreshing-the-entire-page/


(Michael - DiscourseHosting.com) #47

Just let me check if I get this. The example you mention uses Google DFP (Doubleclick for Publishers). As far as I understand, that’s not the same as AdSense. Can you confirm that this method works with a regular Adsense account?


(ljpp) #48

@michaeld Was your question for me?

I can’t confirm if the method works on AdSense nor DFP. I lack the coding skillz to implement it. I am just a webmaster wrestling with the dilemma that Discourse is an awesome platform to work with, but I need to monetize it some how to pay for the hosting bills. But as I read the article, the solution makes a lot of sense.

And no DFP (ad server) and AdSense (ad network) are not the same. However, AdSense ads can be served via DFP, and this is in fact the recommended method, as it allows you to rotate your ads and display the ones that pay the best.


(Michael - DiscourseHosting.com) #49

Yes, that’s what I thought. You can’t just use this to serve AdSense ads. You have to sign up and configure DFP and that means you’ll have to do some tuning, and you’ll loose your usual AdSense statistics and reports.

So we will probably create a DFP plugin, and we can support that functionality there. I’ve already done some tests and they look promising. But for a ‘pure’ AdSense plugin, this is not a solution.


(ljpp) #50

Does the plugin have some reporting functionality? Never tried it.

Actuallly, IIRC, the DFP does configure the AdSense accordingly and the reports are viewable within AdSense too. Payments etc. come from AdSense as usual. DFP just has a feature to fill any unsold inventory with AdSense ads, and enabling this option is a matter of one tick in a box.


(Michael - DiscourseHosting.com) #51

I read this here Google DFP compared to directly serving AdSense


(@SenpaiMass) #53

How do i uninstall this plugin ?


(Manthan Mallikarjun) #54

It depends. Are you using the docker installation, or something else?


(@SenpaiMass) #55

@nahtnam yes i am using docker installation :smile:


(Manthan Mallikarjun) #56

I think you just remove the git url from the app.yml and run ./launcher rebuild app.


(Brad Huber) #57

We’re using the plugin, and almost 80% of the time, the ads dont even show up on first page load. Not even after a few clicks, like other people. Have other people been having this issue?


(Michael - DiscourseHosting.com) #58

I’m trying to change the plugin in order to solve the problem where ads don’t show up after a few times.

It’s almost solved, but not completely. The ads do refresh, but most times, only the top slot is filled on a topic page.

Here’s a gist: https://gist.github.com/discoursehosting/0b4e1ae34e2b6b33e505

I’ve tried other methods like @Piioo’s but can’t get it to work. I don’t want to make all the HAQL changes that he made.

As you can see, I’m calling adsbygoogle.push({}); twice, because that call is supposed to fill one ad slot. Attempts to enumerate the ins.adsbygoogle elements did not succeed.

Can anyone help out here?


(Ricardo Viteri) #59

So can I add my custom code using this plugin? I run an ad for a company so they give me the image file and I point to their site. Is this possible?


#60

Does this work for Discourse 1.0> ?


(Michael - DiscourseHosting.com) #61

Some things have changed with respect to plugins. At this moment we follow the stable branch.