Google Analytics 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 tool allows you to set a code for use with Google Analytics, which allows you to track your visitors.

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.'googleanalytics/code.php')) include_once(DOKU_PLUGIN.'googleanalytics/code.php');
if (function_exists('ga_google_analytics_code')) ga_google_analytics_code();

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

Template Authors Note: You can insert the above code and make your template "Google Analytics Ready", even if your users do not use Google Analytics (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/googleanalytics folder.)


To upgrade, remove the original lib/plugins/googleanalytics 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

June 27, 2008

  • Fixed bug with tracking code
  • Added better check for admin users (removed old 'superuser' check)

Thanks to David Ordal for these fixes.

June 10, 2008

  • Updated to use the new Javascript library for Google Analytics. Thanks to Geoff W. and RJS for the contribution.

March 11, 2007

February 23, 2007

February 15, 2007

August 20, 2006

  • Initial release
QR Code
QR Code Google Analytics for DokuWiki (generated for current page)