====== Statistics Plugin ======
---- plugin ----
description: Log and analyze access statistics
author : Andreas Gohr
email : dokuwiki@cosmocode.de
type : admin, action
lastupdate : 2024-01-30
compatible : Hrun, Ponder Stibbons, Binky, Weatherwax, Elenor of Tsort, Detritus
depends :
conflicts :
similar : quickstats
tags : statistics, logging, mysql
updatemessage: The MySQL based version of this plugin is obsolete, check the docs.
downloadurl: https://github.com/cosmocode/dokuwiki-plugin-statistics/zipball/master
sourcerepo : https://github.com/cosmocode/dokuwiki-plugin-statistics
bugtracker : https://github.com/cosmocode/dokuwiki-plugin-statistics/issues
----
This plugin provides logging and statistics on views and visitors of your wiki. The statistics are a mix of wiki centric stats (like number of edits) and typical web statistics (views, visitors). It should be most useful to people using [[:DokuWiki]] as their blog or homepage but provides useful stats for internal use as well.
:!: This version of the plugin is no longer maintained. It will be replaced by a new version not requiring a MySQL database in the future. Read [[#Early Access Features]] below, before deciding to install this plugin.
The following statistics are currently provided:
* Dashboard
* general statistics like Bounces, Returning Vistors, Average Session lengths
* Popular Pages
* the most viewed pages
* Incoming Links
* the top referrers
* New Incoming Links
* the top referrers which were not seen before the selected time frame
* Outgoing Links
* the most clicked outgoing links
* Search Engines
* the most used search engines to find your wiki
* External Search Phrases
* the top search phrases people used in search engines to find your wiki
* External Search Words
* the top search keywords people used in search engines to find your wiki
* Internal Search Phrases
* the top search phrases people used in your integrated wiki search
* Internal Search Words
* the top search keywords people used in your integrated wiki search
* Browsers
* the most used browsers to view your wiki
* Operating Systems
* the most used operating systems used by your visitors
* Countries
* where your visitors came from in the selected time frame
* Screensize
* the screen size your visitors have
* Resolution
* the screen resolution used by your visitors
For nearly all these stats, graphical diagrams are provided as well.
===== Download =====
Please use the download link provided above for downloading the plugin. Be sure to read about [[#upgrading]] first, if you are running an older version already.
==== Changes ====
{{rss>https://github.com/splitbrain/dokuwiki-plugin-statistics/commits/master.atom date}}
===== Installing =====
==== Requirements ====
* A MySQL datatabase
* mysqli extension for PHP
* libgd extension for PHP
==== Installation ====
- Install the plugin through the [[plugin:Extension]] Manager or manually.
- Create the MySQL database (see below). Without this you wont be **able** to do the next step.
- Create the needed MySQL tables with the provided ''db.sql'' file
- Configure the database access through the [[plugin:config|Config Manager]]
==== DB creation ====
On the shell run the following commands:
# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE stats;
MariaDB [(none)]> \q
To create the needed MySQL tables you can
- either use phpmyadmin's import function
* Select the database that is used by your DokuWiki and chose "Import" from the top-menu, then upload the file.
- import manually using MySQL in your shell
# mysql -u db_user -p your_dokuwiki_database < /full/path/to/db.sql
===== Upgrading =====
Upgrades will most probably require database upgrades. I recommend to do them //before// updating the plugin.
- Have a look at the current [[https://github.com/splitbrain/dokuwiki-plugin-statistics/blob/master/db.sql|db.sql]].
- Search this file for lines starting with ''%%-- UPGRADE%%''
- Find the first such line containing a date newer than your plugin version
- Copy all following lines and apply them to your existing database
Please note that, depending on the amount of data in your database, these updates can take a really long time. I suggest to run these updates via the command line instead of using a web based tool like PHPMyAdmin.
===== Known limitations =====
* Currently only users with JavaScript enabled are logged
* the search word parsing is a bit flaky ("don't" is two words)
* external search engines no longer provide full referrers, so no search word analysis is available for them
===== Early Access Features =====
The plugin as described above is mostly abandoned and no longer works correctly. A completely refactored version is available through the [[https://www.cosmocode.de/en/services/wiki/dokuwiki-partnership/|DokuWiki Business Plugin Partner Program]].
This version replaces the MySQL based data storage with SQLite and uses modern Chart.js based graphs. It also introduces a few privacy related configuration options.