Tags:
create new tag
view all tags

PageStatsPlugin

Display page view and save statistics of a specific page

Syntax Rules

%PAGESTATS{ web="%INCLUDINGWEB%" topic="%INCLUDINGTOPIC%" max="10" }%

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)

Examples

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   10.10.10.60
2010-10-25 - 16:27 TWikiGuest view PageStatsPlugin   10.10.10.60

Demo

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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | More topic actions
Topic revision: r3 - 2015-06-17 - TWikiAdminUser
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.PageStatsPlugin.