diff options
author | Timo Besenreuther <timo.besenreuther@gmail.com> | 2013-03-26 21:16:35 +0400 |
---|---|---|
committer | Timo Besenreuther <timo.besenreuther@gmail.com> | 2013-03-26 21:16:35 +0400 |
commit | 65458d099ae4a0ddb1923b7f6e110c5c0a9d3207 (patch) | |
tree | 030d0e094df2f7da4fd28614910834283ead7489 /plugins/Actions/Controller.php | |
parent | fc578d6546e15001cd4de4459cc8fadf516ebbac (diff) |
refs #1700 basic performance analytics: handle server generation time for each page and page title
CORE
* formatting sub-second times
* getColumn() method on data table array (in order to behave the same as the regular data table class)
* data tables can store in their meta data, which columns are empty (this is used in order to dynamically hide the new "generation time" column)
* ViewDataTable and Api.getProcessedReport act according to the empty column meta data
SCHEMA
* new column custom_float_1 in log_link_visit_action
* new version to apply the change
TRACKER
* Piwik_Tracker::setGenerationTime
* tracking parameter "generation_time_me"
* value is stored in new custom_float_1 column
* the log importer can handle a group "generation_time_micro" which can be used in a custom log format. _micro is used because apache can log the time in microseconds but piwik processes milliseconds.
* note: extension of JS tracker still missing
ACTIONS PLUGIN
* for pages and page titles, add new columns sum_time_generation and nb_hits_with_time_generation to the blob archives
* if they are set, compute avg_time_generation on the API level. if not, remove the columns and mark them as empty in the data table meta data.
* show new column "avg. generation time" in the pages and page titles reports
plus TESTS for everything
Diffstat (limited to 'plugins/Actions/Controller.php')
-rw-r--r-- | plugins/Actions/Controller.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Actions/Controller.php b/plugins/Actions/Controller.php index e3990d7b43..00eb49a804 100644 --- a/plugins/Actions/Controller.php +++ b/plugins/Actions/Controller.php @@ -49,7 +49,7 @@ class Piwik_Actions_Controller extends Piwik_Controller protected function configureViewPages($view) { - $view->setColumnsToDisplay( array('label','nb_hits','nb_visits', 'bounce_rate', 'avg_time_on_page', 'exit_rate') ); + $view->setColumnsToDisplay( array('label','nb_hits','nb_visits', 'bounce_rate', 'avg_time_on_page', 'exit_rate', 'avg_time_generation') ); } /** @@ -386,7 +386,10 @@ class Piwik_Actions_Controller extends Piwik_Controller $view->setColumnTranslation('avg_time_on_page', Piwik_Translate('General_ColumnAverageTimeOnPage')); $view->setColumnTranslation('bounce_rate', Piwik_Translate('General_ColumnBounceRate')); $view->setColumnTranslation('exit_rate', Piwik_Translate('General_ColumnExitRate')); + $view->setColumnTranslation('avg_time_generation', Piwik_Translate('General_ColumnAverageGenerationTime')); $view->queueFilter('ColumnCallbackReplace', array('avg_time_on_page', array('Piwik', 'getPrettyTimeFromSeconds'))); + $view->queueFilter('ColumnCallbackReplace', array('avg_time_generation', + create_function('$averageTimeOnSite', 'return $averageTimeOnSite ? Piwik::getPrettyTimeFromSeconds($averageTimeOnSite, true, true, false) : "-";'))); } if(Piwik_Common::getRequestVar('enable_filter_excludelowpop', '0', 'string' ) != '0') |