Fullscreen
[Show/Hide Right Column]

Metrics Dashboard


Integrated in Tiki5, and initially developed as part of the Support Mozilla project, the metrics dashboard allows the administrator of a site to configure metrics to be tracked over time, by means of tiki-metrics.php. The site editors can then use these metrics to investigate changes in usage.

Image

Metrics administration

By default, the metrics dashboard provides no metric. It only has basic mechanisms for collecting them based on user-provided SQL queries. Given access to the database, the dashboard can be used to monitor metrics from any application. External statistical packages can be used to generate the data.

Image

In the administration panel, metrics and tabs can be defined. Tabs are only a form of organization to be used on the dashboard. Each metric can be on multiple tabs. The association between the tab and the metric is only used to collect the required data. The tab must also define a content block, containing a configuration of how to display each metric.

Image

The metrics are basically named SQL queries with several parameters that can be included. Each metric must indicate the type of data that will be returned by the query, which will affect how the results are displayed.

Image

The metric queries are expected to have a field called date_field when using the date related parameters. When no such field exists in the database, subqueries will often be required. Unlike most date fields in TikiWiki, the dates are expected to be in the DATETIME format, rather than UNIX timestamps. The conversion can be made using FROM_UNIXTIME().

Sample query: Pages modified
SELECT COUNT(*) as count, MIN(DATE(date_field)) date_field 
FROM (
    SELECT * 
    FROM (
        SELECT FROM_UNIXTIME(lastModif) as date_field 
        FROM tiki_pages
    ) pages 
    WHERE $date_range$
) changes 
$range_groupby$


Sample tab content block
{metric name="Pages modified" value="count" sparkline=true table=true trend=true toggle=true}




alias
Metrics Admin | MetricsDashBoard

Contributors to this page: xavi67881 points  , Marc Laporte9140 points  and Louis-Philippe Huberdeau1046 points  .
Page last modified on Saturday 24 March, 2012 00:35:39 UTC by xavi67881 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki