<<

NAME

Konstrukt::Plugin::browserstats - Browser statistics plugin

SYNOPSIS

        <!-- add browser request to the db -->
        <& browserstats / &>
        
        <!-- 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" / &>

DESCRIPTION

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.

CONFIGURATION

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  1 #userlevel to view the stats
        browserstats/userlevel_clear 2 #userlevel to clear the logs

METHODS

execute_again

Yes, this plugin may return dynamic nodes (i.e. template nodes).

init

Initializes this object. Sets $self->{backend} and $self->{template_path}layout/. init will be called by the constructor.

install

Installs the templates.

Parameters:

none

prepare

Prepare method

Parameters:

execute

All the work is done in the execute step.

Parameters:

hit

Logs a hit.

Parameters:

show_stats

Displays the results of the browser logging.

Parameters:

AUTHOR

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.

SEE ALSO

Konstrukt::Plugin::browserstats::DBI, Konstrukt::Plugin, Konstrukt, HTTP::BrowserDetect

<<