Metrics Dashboard 

Feature Deprecated: This feature existed between Tiki version 5 to Tiki version 12 and was removed in Tiki version 13 as it was subsequently not used and was too difficult to configure. If we were to do it now, there are more modern ways to implement similar functionality.


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.

tiki9_metrics_dashboard_00.png

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.

tiki9_metrics_dashboard_01.png

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.

tiki9_metrics_dashboard_03.png

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.

tiki9_metrics_dashboard_04.png

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 Tiki, 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

Show PHP error messages