PDF rausgenommen
This commit is contained in:
59
msd2/tracking/piwik/plugins/Events/Reports/Base.php
Normal file
59
msd2/tracking/piwik/plugins/Events/Reports/Base.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\EventDispatcher;
|
||||
use Piwik\Plugin\ViewDataTable;
|
||||
use Piwik\Plugins\Events\API;
|
||||
use Piwik\Plugins\Events\Columns\Metrics\AverageEventValue;
|
||||
use Piwik\Report\ReportWidgetFactory;
|
||||
use Piwik\Widget\WidgetsList;
|
||||
|
||||
abstract class Base extends \Piwik\Plugin\Report
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->categoryId = 'General_Actions';
|
||||
$this->subcategoryId = 'Events_Events';
|
||||
|
||||
$this->processedMetrics = array(
|
||||
new AverageEventValue()
|
||||
);
|
||||
}
|
||||
|
||||
public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
|
||||
{
|
||||
if (!$this->isSubtableReport) {
|
||||
$widget = $factory->createWidget()->setParameters(array(
|
||||
'secondaryDimension' => API::getInstance()->getDefaultSecondaryDimension($this->action)
|
||||
));
|
||||
|
||||
$widgetsList->addToContainerWidget('Events', $widget);
|
||||
}
|
||||
}
|
||||
|
||||
public function configureView(ViewDataTable $view)
|
||||
{
|
||||
$this->configureFooterMessage($view);
|
||||
}
|
||||
|
||||
protected function configureFooterMessage(ViewDataTable $view)
|
||||
{
|
||||
if ($this->isSubtableReport) {
|
||||
// no footer message for subtables
|
||||
return;
|
||||
}
|
||||
|
||||
$out = '';
|
||||
EventDispatcher::getInstance()->postEvent('Template.afterEventsReport', array(&$out));
|
||||
$view->config->show_footer_message = $out;
|
||||
}
|
||||
|
||||
|
||||
}
|
31
msd2/tracking/piwik/plugins/Events/Reports/GetAction.php
Normal file
31
msd2/tracking/piwik/plugins/Events/Reports/GetAction.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventAction;
|
||||
|
||||
class GetAction extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->dimension = new EventAction();
|
||||
$this->name = Piwik::translate('Events_EventActions');
|
||||
$this->documentation = ''; // TODO
|
||||
$this->metrics = array('nb_events', 'sum_event_value', 'min_event_value', 'max_event_value', 'nb_events_with_value');
|
||||
if (Common::getRequestVar('secondaryDimension', false) == 'eventCategory') {
|
||||
$this->actionToLoadSubTables = 'getCategoryFromNameId';
|
||||
} else {
|
||||
$this->actionToLoadSubTables = 'getNameFromActionId';
|
||||
}
|
||||
$this->order = 1;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventAction;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getActionFromCategoryId class.
|
||||
*/
|
||||
class GetActionFromCategoryId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->dimension = new EventAction();
|
||||
$this->name = Piwik::translate('Events_EventActions');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventAction;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getActionFromNameId class.
|
||||
*/
|
||||
class GetActionFromNameId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->dimension = new EventAction();
|
||||
$this->name = Piwik::translate('Events_EventActions');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
31
msd2/tracking/piwik/plugins/Events/Reports/GetCategory.php
Normal file
31
msd2/tracking/piwik/plugins/Events/Reports/GetCategory.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventCategory;
|
||||
|
||||
class GetCategory extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->dimension = new EventCategory();
|
||||
$this->name = Piwik::translate('Events_EventCategories');
|
||||
$this->documentation = ''; // TODO
|
||||
$this->metrics = array('nb_events', 'sum_event_value', 'min_event_value', 'max_event_value', 'nb_events_with_value');
|
||||
if (Common::getRequestVar('secondaryDimension', false) == 'eventName') {
|
||||
$this->actionToLoadSubTables = 'getNameFromCategoryId';
|
||||
} else {
|
||||
$this->actionToLoadSubTables = 'getActionFromCategoryId';
|
||||
}
|
||||
$this->order = 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventCategory;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getCategoryFromActionId class.
|
||||
*/
|
||||
class GetCategoryFromActionId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->dimension = new EventCategory();
|
||||
$this->name = Piwik::translate('Events_EventCategories');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventCategory;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getCategoryFromNameId class.
|
||||
*/
|
||||
class GetCategoryFromNameId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->dimension = new EventCategory();
|
||||
$this->name = Piwik::translate('Events_EventCategories');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
31
msd2/tracking/piwik/plugins/Events/Reports/GetName.php
Normal file
31
msd2/tracking/piwik/plugins/Events/Reports/GetName.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventName;
|
||||
|
||||
class GetName extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->dimension = new EventName();
|
||||
$this->name = Piwik::translate('Events_EventNames');
|
||||
$this->documentation = ''; // TODO
|
||||
$this->metrics = array('nb_events', 'sum_event_value', 'min_event_value', 'max_event_value', 'nb_events_with_value');
|
||||
if (Common::getRequestVar('secondaryDimension', false) == 'eventCategory') {
|
||||
$this->actionToLoadSubTables = 'getCategoryFromNameId';
|
||||
} else {
|
||||
$this->actionToLoadSubTables = 'getActionFromNameId';
|
||||
}
|
||||
$this->order = 2;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventName;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getNameFromActionId class.
|
||||
*/
|
||||
class GetNameFromActionId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->dimension = new EventName();
|
||||
$this->name = Piwik::translate('Events_Names');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Events\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Events\Columns\EventName;
|
||||
|
||||
/**
|
||||
* Report metadata class for the Events.getNameFromCategoryId class.
|
||||
*/
|
||||
class GetNameFromCategoryId extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->categoryId = 'Events_Events';
|
||||
$this->processedMetrics = false;
|
||||
|
||||
$this->dimension = new EventName();
|
||||
$this->name = Piwik::translate('Events_EventNames');
|
||||
$this->isSubtableReport = true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user