Konstrukt::Plugin::browserstats - Browser statistics plugin
Usage:
<!-- add browser request to the db --> <& browserstats / &>
or
<!-- display the overall top browsers --> <& browserstats show="all" / &>
<!-- display the top browsers 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 browserstats/aggregate --> <& browserstats show="year" / &>
Result:
A table displaying the statistics, if the attribute show is set. Nothing otherwise.
show
Creates statistics about the browsers used to access 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 browserstats/backend DBI
See the documentation of the backend modules (e.g. "CONFIGURATION" in Konstrukt::Plugin::browserstats::DBI) for their configuration.
#granularity browserstats/aggregate all #specifies the granularity of the logs. may be all, year, month, day #browser classes. #syntax: classname1 => browsername1 browsername2, classname2 => ..., other => * #see HTTP::BrowserDetect for a list of browsernames browserstats/classes nsold => nav2 nav3 nav4 nav4up navgold, ns6 => nav6 nav6up, firefox => firefox, opera => opera, mozilla => mozilla, ie => ie, robot => robot, other => * #layout browserstats/template_path /templates/browserstats/ #only count unique visitors (determined by session) browserstats/unique 1 #access control browserstats/userlevel_view 2 #userlevel to view the stats browserstats/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 browser 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 browserstats/aggregate
all
year
month
day
browserstats/aggregate
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::browserstats::DBI, Konstrukt::Plugin, Konstrukt, HTTP::BrowserDetect
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.