Konstrukt::Plugin::hitstats - Hit statistics plugin
<!-- count hit. use the specified title --> <& hitstats title="some page" / &> <!-- count hit. use the current filename as title --> <& hitstats / &> <!-- display the overall top sites --> <& hitstats show="all" / &> <!-- display the top sites grouped by year --> <!-- month and day will also work, if the data is stored in such a fine granularity --> <!-- the display aggregation should not be finer than the setting hitstats/aggregate --> <& hitstats show="year" / &> <!-- only display the top 20 sites --> <& hitstats show="all" limit="20" / &> <!-- with optional title attribute --> <& hitstats show="counter" title="some page" / &> <!-- display a counter and use the filename of the current page as the title --> <& hitstats show="counter" / &>
Creates statistics about the number of hits of your homepage.
You may simply integrate it by putting the tag into your page. See </SYNOPSIS> for details.
You may do some configuration in your konstrukt.settings to let the plugin know where to get its data and which layout to use. Defaults:
#backend hitstats/backend DBI
See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::hitstats::DBI) for their configuration.
#granularity hitstats/aggregate all #specifies the granularity of the logs. may be all, year, month, day #layout hitstats/template_path /templates/hitstats/ #only count unique visitors per page (determined by session) hitstats/unique 0 #don't count hits by robots hitstats/ignore_robots 1 #access control hitstats/userlevel_view 2 #userlevel to view the stats hitstats/userlevel_clear 3 #userlevel to clear the logs
Yes, this plugin may return dynamic nodes (i.e. template nodes).
Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.
Installs the templates.
Parameters:
none
Prepare method
$tag - Reference to the tag (and its children) that shall be handled.
All the work is done in the execute step.
Logs a hit.
$title - The title of the page to log. (optional) If not defined, the filename of the current page will be used.
Displays the results of the hit logging.
$aggregate - The range over which the hits should be aggregated. May be all, year, month and day. Should not be finer than the setting hitstats/aggregate
all
year
month
day
hitstats/aggregate
$limit - Max. number of returned entries.
Displays a simple counter for the specified page.
$title - The title of the page
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
Konstrukt::Plugin::hitstats::DBI, Konstrukt::Plugin, Konstrukt
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.