statistics1Add my vote for this tag create new tag
, view all tags


Display page view and save statistics of a specific page

Syntax Rules


Parameter Description Default
web Name of web %WEB%
topic Name of topic %TOPIC%
max Limit the number of entries shown (all entries of the current month)


Example Description
%PAGESTATS% All stats of the current topic for the current month
%PAGESTATS{ max="10" }% The 10 latest stats of the current topic for the current month
%PAGESTATS{ web="%INCLUDINGWEB%" topic="%INCLUDINGTOPIC%" }% All stats of the included topic; useful to include a generic statistics page

Sample Output

Timestamp User Action Page Extra IP Address
2010-10-25 - 16:12 TWikiGuest view PageStatsPlugin
2010-10-25 - 16:27 TWikiGuest view PageStatsPlugin


Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %PAGESTATSPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Display page view and save statistics of a specific page

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugins web (see below)
  • Unzip PageStatsPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/PageStatsPlugin.txt Plugin topic
    data/Sandbox/TestTopicPageStatsPlugin.txt Plugin topic test
    lib/TWiki/Plugins/PageStatsPlugin.pm Plugin Perl module
  • Visit configure in your TWiki installation, and enable the plugin in the {Plugins} section.
  • Test if the installation was successful:

Plugin Info

Plugin Author: TWiki:Main.WillNorris, TWiki:Main.PeterThoeny
Copyright: © 2003 TWiki:Main.WillNorris
© 2011 TWiki:Main.PeterThoeny
© 2008-2011 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2011-07-13
Change History:  
2011-07-13: TWikibug:Item6725: Change global package variables from "use vars" to "our"
2011-02-01: TWikibug:Item6638: Code rewrite from scratch (same functionality); doc improvements; changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2003-10-25: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins.Benchmark: GoodStyle nn%, FormattedSearch nn%, PageStatsPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PageStatsPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PageStatsPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/PageStatsPluginAppraisal

Related Topics: TWikiPlugins, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 PageStatsPlugin.md5 r5 r4 r3 r2 r1 manage 0.2 K 2011-07-14 - 06:22 PeterThoeny  
Compressed Zip archivetgz PageStatsPlugin.tgz r5 r4 r3 r2 r1 manage 4.5 K 2011-07-14 - 06:22 PeterThoeny  
Compressed Zip archivezip PageStatsPlugin.zip r6 r5 r4 r3 r2 manage 6.4 K 2011-07-14 - 06:22 PeterThoeny  
Unknown file formatEXT PageStatsPlugin_installer r3 r2 r1 manage 3.5 K 2011-07-14 - 06:22 PeterThoeny  
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.