It's better when it's simple

User Tools

Site Tools


SearchStats Plugin

Compatible with DokuWiki

  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes
  • 2018-04-22 "Greebo" yes

plugin This plugin records the search words and displays stats in the admin section

Last updated on
Helper, Admin, Action
Conflicts with

Tagged with search, statistics

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.


No special requirements.

Syntax and Usage

Nothing special to do for you. The plugin stores search keywords automatically and displays stats in the admin backend. The bar chart is displayed by using the Google Chart API.


  • Check conflict with the docsearch Plugin



Please report bugs and issues at

There is a conflict with the docsearch Plugin. When docsearch AND searchstats are both installed your search keywords will get counted double. As you know that, you could halve the results of searchstats or wait for an update when I find a bugfix for that.


Is it just me or is every search counted twice? - Andy 03.09.2010

Actually that doesn't happen on my installation. Could you tell me a search term where this happens in your installation? Perhaps you could list the plugins you are using or mail them to me? - Imho 03.09.2010
Hi, thanks for the quick happens with all search terms. I also had a similar situation to the error below and i had to create the folder in data/index manually before I could use the plugin (my file/folder permissions are all ok, had no other problems so far). I´ll have a play around and let you know if I figure out what it is with the search 'doubling'.
Thanks. That would be great.
Seems to be a conflict with the docsearch plugin (a plugin I must admit that I have never used :-) ). I removed it and the stats are now correct. Whether this is a general conflict or just down to my installation, who knows… Cheers.
You are absolutely right. I installed docsearch and had the same 'doubling' effect. Docsearch Plugin indexes documents (pdf, …) and every time a user searches for keywords in the pages, docsearch performs a second search in the docsearch index. That's why we got a double counting. I will add docsearch to the conflict list and try to find a workaround in my plugin. Thank you so much for figuring this out. - Imho 06.09.2010
A possible Workaround is to check if $conf['datadir'] contains the word docsearch.
function _getSearchWords(&$event, $param) {
global $conf;

if(strpos($conf['datadir'],"docsearch") == false){

I get the same issue (all search reported twice), I switched back to the default template and disabled all other plugin but I still have the issue. - Matthieu 07.01.2011

update : a search is counted twice when the cache is empty, so every new search start at 2, then increment one by one. If I delete the cache, it's counted twice one more time. - Matthieu 08.01.2011

On “Binky”, after clean install, entering the plugin's page in Admin area first time (ie.: there are NO search words registered yet) there are a lot PHP error messages appear till I use the search function at least once. Peter, 07/02/2014

Chinese font and other East Asian characters seem not be supported. In these language, space is not used to separate between words. So a word comprised of several characters will be divided into different queries. For example, searching for a Chinese word “维基” results in two queries “维” and “基”. – baifeng 7/29/2013

plugin/searchstats.txt · Last modified: 2023-08-25 09:55 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki