Google AdSense plugin for Discourse forum
bundle exec rake plugin:install repo=http://github.com/discoursehosting/discourse-adsense
in your discourse directorybundle exec rake assets:clean
bundle exec rake assets:precompile
As seen in a how-to on meta.discourse.org, simply add the plugin's repo url to your container's app.yml file:
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/discoursehosting/discourse-adsense.git
cd /var/discourse
git pull
./launcher rebuild app
Go to Admin -> Settings -> AdSense
Enter your AdSense publisher ID (ca-pub-xxxxxxxxxxxxxxxx)
Create new ad slots within your AdSense account (728x90 for desktop, 320x50 for mobile)
Copy the slot id # numbers (ten digits shown in the ID column) in the Discourse settings
Enable the slots you want to use
Remember to watch extra whitespace at the beginning and end of each field.
You can use the 'adsense_through_trust_level' to disable ads for users above a certain trust level.
GPL v2