Google AdSense for DokuWiki


It's not required, but please consider linking to this page or the main page from your site if you like this product.


Before downloading or using this product, make sure you understand and accept the terms of the license.

After downloading, make sure to follow the install instructions or upgrading instructions below.


This plugin allows you to include Google AdSense advertisings into your wiki page. It is possible to configure whether or not ads are shown to admins and/or logged-in users.

The plugin also exports a function for use with your template, so you will have to insert the following code into your template (main.php), somewhere inside of the <head></head> tags.

if (file_exists(DOKU_PLUGIN.'googleads/code.php'))
if (function_exists('gads_code')) gads_code();

Note: Inserting the code above is required, not optional.

Template Authors Note: You can insert the above code and make your template "Google AdSense Ready", even if your users do not use Google AdSense (or have this plugin.)


As a plugin all you need to do is unpack the file into the lib/plugins/ directory (you should end up with a lib/plugins/googleads folder.)


To upgrade, remove the original lib/plugins/googleads folder, and install the new version as instructed above. You may wish to make a note of your google analytics code first though.

What's New

August 30, 2009

  • Terence has taken over the project from Bernd and the project will be hosted on this site from here on.

April 9, 2007

  • Don't display ads on login/registration pages

Mar 14, 2007

  • Initial release (Based on Google Analytics plugin.)
QR Code
QR Code Google AdSense for DokuWiki (generated for current page)