DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:googleanalytics

Google Analytics for DokuWiki

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" unknown
  • 2014-09-29 "Hrun" unknown

plugin This tool allows you to set a code for use with Google Analytics, which allows you to track your visitors.

Last updated on
2017-02-07
Provides
Action
Repository
Source

Similar to piwik, referrers

Tagged with embed, google, statistics

This plugin allows you to track visits to your wiki in Google Analytics.

Download

Use the download link given above in the plugin manager or to download the plugin manually.

Setup

To properly use this plugin you will need to set up and configure a Google Analytics property.

Google Analytics Setup

Sign into https://analytics.google.com and create a new property:

Now follow the steps below. There are also screenshots available to help you find your way through the menus.

At the end of the setup process you should get a Tracking Code. You can also find it under AdminPropertyTracking InfoTracking Code. The code starts with UA followed by a large number and a shorter number separated by dashes (UA-XXXXXX-XX).

Next, setup the custom dimensions. Go to AdminPropertyCustom DefinitionsCustom Dimensions. There create two new custom dimensions:

  1. Name: wiki-action
    • Scope: Hit
    • Index: 1
    • Active: yes
  2. Name: wiki-id
    • Scope: Hit
    • Index: 2
    • Active: yes

Be sure the indexes are correct!

Next, if you want to track logged in users across different devices, you have to enable the User ID tracking feature and create a new view. To do so go to AdminPropertyTracking InfoUser-ID and follow the wizard. Please not that this step is completely optional. It may have repercussions on your privacy policies. Be sure to read the documentation provided by Google.

Finally go to AdminView and select the view you want to use1). Then pick View Settings. Enable Site Search Tracking, enter q as Query parameter and tick the Strip query parameters out of URL checkbox.

DokuWiki Setup

Once you have finished your Setup at Google Analytics, you can configure DokuWiki. Install the plugin via the extension manager, then go the configuration and use the config options to configure the plugin for your account.

You have to fill in at least your Tracking Code!

If you enabled User ID tracking in the Google Analytics above, you can enable it here as well.

Usage

Once configured, your Google Analytics should begin to show data after a day or two. Please refer to Google Analytics Help for info on general usage.

Developer Info

Once configured, the plugin makes Google's ga() method available globally. You can use it to log additional events from your JavaScript.

if(window.ga) window.ga('send', 'event', ...);

Please refer to Googles documentation on details.

1)
If you set up User ID tracking above, you probably want to repeat this step for both views. Otherwise there's only one
plugin/googleanalytics.txt · Last modified: 2017-07-14 07:54 by 220.130.139.7 · Currently locked by: 68.180.230.227