diff options
Diffstat (limited to 'plugins/Events/Events.php')
-rw-r--r-- | plugins/Events/Events.php | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/Events/Events.php b/plugins/Events/Events.php index 8ae0f5cb2e..d3fc8501f1 100644 --- a/plugins/Events/Events.php +++ b/plugins/Events/Events.php @@ -27,16 +27,11 @@ class Events extends \Piwik\Plugin 'Metrics.getDefaultMetricDocumentationTranslations' => 'addMetricDocumentationTranslations', 'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations', 'ViewDataTable.configure' => 'configureViewDataTable', - 'Live.getAllVisitorDetails' => 'extendVisitorDetails', 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', + 'Actions.getCustomActionDimensionFieldsAndJoins' => 'provideActionDimensionFields' ); } - public function extendVisitorDetails(&$visitor, $details) - { - $visitor['events'] = $details['visit_total_events']; - } - public function addMetricTranslations(&$translations) { $translations = array_merge($translations, $this->getMetricTranslations()); @@ -265,4 +260,15 @@ class Events extends \Piwik\Plugin { $stylesheets[] = "plugins/Events/stylesheets/datatable.less"; } + + public function provideActionDimensionFields(&$fields, &$joins) + { + $fields[] = 'log_action_event_category.type AS eventType'; + $fields[] = 'log_action_event_category.name AS eventCategory'; + $fields[] = 'log_action_event_action.name as eventAction'; + $joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_event_action + ON log_link_visit_action.idaction_event_action = log_action_event_action.idaction'; + $joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_event_category + ON log_link_visit_action.idaction_event_category = log_action_event_category.idaction'; + } } |