The most recent version of this page is a draft.DiffThis version is outdated by a newer approved version.DiffThis version (2022/01/31 18:59) is a draft.
Approvals: 0/1
The Previously approved version (2021/10/23 04:50) is available.Diff

This is an old revision of the document!

Dokuwiki plugin for Google Tag Manager

Dokuwiki plugin to add a gtm tag to each wiki pages. For more info about GTM, please go to

You can think of GTM as a “include” manager for your statistics and other tags, e.g. Piwik, Google Analytics, Olark etc.

The main advantage of using this is that you can enable and disable tags with the management console from Google and preview the tags in your page without breaking them. Also you can enable and disable some tags based on different rules, e.g. leave out a certain tag for a certain subdir.

The code is based on the google analytics plugin from TJ Grant.