PDF rausgenommen
This commit is contained in:
74
msd2/tracking/piwik/plugins/Contents/API.php
Normal file
74
msd2/tracking/piwik/plugins/Contents/API.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?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\Contents;
|
||||
|
||||
use Piwik\Archive;
|
||||
use Piwik\DataTable;
|
||||
use Piwik\DataTable\Row;
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Contents\Archiver;
|
||||
|
||||
/**
|
||||
* API for plugin Contents
|
||||
*
|
||||
* @method static \Piwik\Plugins\Contents\API getInstance()
|
||||
*/
|
||||
class API extends \Piwik\Plugin\API
|
||||
{
|
||||
public function getContentNames($idSite, $period, $date, $segment = false, $idSubtable = false)
|
||||
{
|
||||
return $this->getDataTable(__FUNCTION__, $idSite, $period, $date, $segment, false, $idSubtable);
|
||||
}
|
||||
|
||||
public function getContentPieces($idSite, $period, $date, $segment = false, $idSubtable = false)
|
||||
{
|
||||
return $this->getDataTable(__FUNCTION__, $idSite, $period, $date, $segment, false, $idSubtable);
|
||||
}
|
||||
|
||||
private function getDataTable($name, $idSite, $period, $date, $segment, $expanded, $idSubtable)
|
||||
{
|
||||
Piwik::checkUserHasViewAccess($idSite);
|
||||
$recordName = Dimensions::getRecordNameForAction($name);
|
||||
$dataTable = Archive::createDataTableFromArchive($recordName, $idSite, $period, $date, $segment, $expanded, $flat=false, $idSubtable);
|
||||
|
||||
if (empty($idSubtable)) {
|
||||
$dataTable->filter('AddSegmentValue', array(function ($label) {
|
||||
if ($label === Archiver::CONTENT_PIECE_NOT_SET) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $label;
|
||||
}));
|
||||
}
|
||||
|
||||
$this->filterDataTable($dataTable);
|
||||
return $dataTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataTable $dataTable
|
||||
*/
|
||||
private function filterDataTable($dataTable)
|
||||
{
|
||||
$dataTable->queueFilter('ReplaceColumnNames');
|
||||
$dataTable->queueFilter('ReplaceSummaryRowLabel');
|
||||
$dataTable->filter(function (DataTable $table) {
|
||||
$row = $table->getRowFromLabel(Archiver::CONTENT_PIECE_NOT_SET);
|
||||
if ($row) {
|
||||
$row->setColumn('label', Piwik::translate('General_NotDefined', Piwik::translate('Contents_ContentPiece')));
|
||||
}
|
||||
foreach ($table->getRows() as $row) {
|
||||
if ($row->getMetadata('contentTarget') === Archiver::CONTENT_TARGET_NOT_SET) {
|
||||
$row->setMetadata('contentTarget', '');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?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\Contents\Actions;
|
||||
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker;
|
||||
|
||||
/**
|
||||
* A content is composed of a name, an actual piece of content, and optionally a target.
|
||||
*/
|
||||
class ActionContent extends Action
|
||||
{
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
parent::__construct(Action::TYPE_CONTENT, $request);
|
||||
|
||||
$url = $request->getParam('url');
|
||||
$this->setActionUrl($url);
|
||||
}
|
||||
|
||||
public static function shouldHandle(Request $request)
|
||||
{
|
||||
$name = $request->getParam('c_n');
|
||||
|
||||
return !empty($name);
|
||||
}
|
||||
|
||||
protected function getActionsToLookup()
|
||||
{
|
||||
return array(
|
||||
'idaction_url' => array($this->getActionUrl(), $this->getActionType())
|
||||
);
|
||||
}
|
||||
|
||||
}
|
316
msd2/tracking/piwik/plugins/Contents/Archiver.php
Normal file
316
msd2/tracking/piwik/plugins/Contents/Archiver.php
Normal file
@ -0,0 +1,316 @@
|
||||
<?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\Contents;
|
||||
|
||||
use Piwik\DataTable;
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Plugins\Actions\ArchivingHelper;
|
||||
use Piwik\RankingQuery;
|
||||
|
||||
/**
|
||||
* Processing reports for Contents
|
||||
*/
|
||||
class Archiver extends \Piwik\Plugin\Archiver
|
||||
{
|
||||
const CONTENTS_PIECE_NAME_RECORD_NAME = 'Contents_piece_name';
|
||||
const CONTENTS_NAME_PIECE_RECORD_NAME = 'Contents_name_piece';
|
||||
const CONTENT_TARGET_NOT_SET = 'Piwik_ContentTargetNotSet';
|
||||
const CONTENT_PIECE_NOT_SET = 'Piwik_ContentPieceNotSet';
|
||||
|
||||
/**
|
||||
* @var DataArray[]
|
||||
*/
|
||||
protected $arrays = array();
|
||||
protected $metadata = array();
|
||||
|
||||
public function __construct($processor)
|
||||
{
|
||||
parent::__construct($processor);
|
||||
$this->columnToSortByBeforeTruncation = Metrics::INDEX_NB_VISITS;
|
||||
$this->maximumRowsInDataTable = ArchivingHelper::$maximumRowsInDataTableLevelZero;
|
||||
$this->maximumRowsInSubDataTable = ArchivingHelper::$maximumRowsInSubDataTable;
|
||||
}
|
||||
|
||||
private function getRecordToDimensions()
|
||||
{
|
||||
return array(
|
||||
self::CONTENTS_PIECE_NAME_RECORD_NAME => array('contentPiece', 'contentName'),
|
||||
self::CONTENTS_NAME_PIECE_RECORD_NAME => array('contentName', 'contentPiece')
|
||||
);
|
||||
}
|
||||
|
||||
public function aggregateMultipleReports()
|
||||
{
|
||||
$dataTableToSum = $this->getRecordNames();
|
||||
$columnsAggregationOperation = null;
|
||||
$this->getProcessor()->aggregateDataTableRecords(
|
||||
$dataTableToSum,
|
||||
$this->maximumRowsInDataTable,
|
||||
$this->maximumRowsInSubDataTable,
|
||||
$this->columnToSortByBeforeTruncation,
|
||||
$columnsAggregationOperation,
|
||||
$columnsToRenameAfterAggregation = null,
|
||||
$countRowsRecursive = array());
|
||||
}
|
||||
|
||||
private function getRecordNames()
|
||||
{
|
||||
$mapping = $this->getRecordToDimensions();
|
||||
return array_keys($mapping);
|
||||
}
|
||||
|
||||
public function aggregateDayReport()
|
||||
{
|
||||
$this->aggregateDayImpressions();
|
||||
$this->aggregateDayInteractions();
|
||||
$this->insertDayReports();
|
||||
}
|
||||
|
||||
private function aggregateDayImpressions()
|
||||
{
|
||||
$select = "
|
||||
log_action_content_piece.name as contentPiece,
|
||||
log_action_content_target.name as contentTarget,
|
||||
log_action_content_name.name as contentName,
|
||||
|
||||
count(distinct log_link_visit_action.idvisit) as `" . Metrics::INDEX_NB_VISITS . "`,
|
||||
count(distinct log_link_visit_action.idvisitor) as `" . Metrics::INDEX_NB_UNIQ_VISITORS . "`,
|
||||
count(*) as `" . Metrics::INDEX_CONTENT_NB_IMPRESSIONS . "`
|
||||
";
|
||||
|
||||
$from = array(
|
||||
"log_link_visit_action",
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_piece",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_piece = log_action_content_piece.idaction"
|
||||
),
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_target",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_target = log_action_content_target.idaction"
|
||||
),
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_name",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_name = log_action_content_name.idaction"
|
||||
)
|
||||
);
|
||||
|
||||
$where = $this->getLogAggregator()->getWhereStatement('log_link_visit_action', 'server_time');
|
||||
$where .= " AND log_link_visit_action.idaction_content_name IS NOT NULL
|
||||
AND log_link_visit_action.idaction_content_interaction IS NULL";
|
||||
|
||||
$groupBy = "log_link_visit_action.idaction_content_piece,
|
||||
log_link_visit_action.idaction_content_target,
|
||||
log_link_visit_action.idaction_content_name";
|
||||
|
||||
$orderBy = "`" . Metrics::INDEX_NB_VISITS . "` DESC";
|
||||
|
||||
$rankingQueryLimit = ArchivingHelper::getRankingQueryLimit();
|
||||
$rankingQuery = null;
|
||||
if ($rankingQueryLimit > 0) {
|
||||
$rankingQuery = new RankingQuery($rankingQueryLimit);
|
||||
$rankingQuery->setOthersLabel(DataTable::LABEL_SUMMARY_ROW);
|
||||
$rankingQuery->addLabelColumn(array('contentPiece', 'contentTarget', 'contentName'));
|
||||
$rankingQuery->addColumn(array(Metrics::INDEX_NB_UNIQ_VISITORS));
|
||||
$rankingQuery->addColumn(array(Metrics::INDEX_CONTENT_NB_IMPRESSIONS, Metrics::INDEX_NB_VISITS), 'sum');
|
||||
}
|
||||
|
||||
$resultSet = $this->archiveDayQueryProcess($select, $from, $where, $groupBy, $orderBy, $rankingQuery);
|
||||
|
||||
while ($row = $resultSet->fetch()) {
|
||||
$this->aggregateImpressionRow($row);
|
||||
}
|
||||
}
|
||||
|
||||
private function aggregateDayInteractions()
|
||||
{
|
||||
$select = "
|
||||
log_action_content_name.name as contentName,
|
||||
log_action_content_interaction.name as contentInteraction,
|
||||
log_action_content_piece.name as contentPiece,
|
||||
|
||||
count(*) as `" . Metrics::INDEX_CONTENT_NB_INTERACTIONS . "`
|
||||
";
|
||||
|
||||
$from = array(
|
||||
"log_link_visit_action",
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_piece",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_piece = log_action_content_piece.idaction"
|
||||
),
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_interaction",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_interaction = log_action_content_interaction.idaction"
|
||||
),
|
||||
array(
|
||||
"table" => "log_action",
|
||||
"tableAlias" => "log_action_content_name",
|
||||
"joinOn" => "log_link_visit_action.idaction_content_name = log_action_content_name.idaction"
|
||||
)
|
||||
);
|
||||
|
||||
$where = $this->getLogAggregator()->getWhereStatement('log_link_visit_action', 'server_time');
|
||||
$where .= " AND log_link_visit_action.idaction_content_name IS NOT NULL
|
||||
AND log_link_visit_action.idaction_content_interaction IS NOT NULL";
|
||||
|
||||
$groupBy = "log_action_content_piece.idaction,
|
||||
log_action_content_interaction.idaction,
|
||||
log_action_content_name.idaction";
|
||||
|
||||
$orderBy = "`" . Metrics::INDEX_CONTENT_NB_INTERACTIONS . "` DESC";
|
||||
|
||||
$rankingQueryLimit = ArchivingHelper::getRankingQueryLimit();
|
||||
$rankingQuery = null;
|
||||
if ($rankingQueryLimit > 0) {
|
||||
$rankingQuery = new RankingQuery($rankingQueryLimit);
|
||||
$rankingQuery->setOthersLabel(DataTable::LABEL_SUMMARY_ROW);
|
||||
$rankingQuery->addLabelColumn(array('contentPiece', 'contentInteraction', 'contentName'));
|
||||
$rankingQuery->addColumn(array(Metrics::INDEX_CONTENT_NB_INTERACTIONS), 'sum');
|
||||
}
|
||||
|
||||
$resultSet = $this->archiveDayQueryProcess($select, $from, $where, $groupBy, $orderBy, $rankingQuery);
|
||||
|
||||
while ($row = $resultSet->fetch()) {
|
||||
$this->aggregateInteractionRow($row);
|
||||
}
|
||||
}
|
||||
|
||||
private function archiveDayQueryProcess($select, $from, $where, $groupBy, $orderBy, RankingQuery $rankingQuery)
|
||||
{
|
||||
// get query with segmentation
|
||||
$query = $this->getLogAggregator()->generateQuery($select, $from, $where, $groupBy, $orderBy);
|
||||
|
||||
// apply ranking query
|
||||
if ($rankingQuery) {
|
||||
$query['sql'] = $rankingQuery->generateRankingQuery($query['sql']);
|
||||
}
|
||||
|
||||
// get result
|
||||
$resultSet = $this->getLogAggregator()->getDb()->query($query['sql'], $query['bind']);
|
||||
|
||||
if ($resultSet === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
return $resultSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Records the daily datatables
|
||||
*/
|
||||
private function insertDayReports()
|
||||
{
|
||||
foreach ($this->arrays as $recordName => $dataArray) {
|
||||
|
||||
$dataTable = $dataArray->asDataTable();
|
||||
|
||||
foreach ($dataTable->getRows() as $row) {
|
||||
$label = $row->getColumn('label');
|
||||
|
||||
if (!empty($this->metadata[$label])) {
|
||||
foreach ($this->metadata[$label] as $name => $value) {
|
||||
$row->addMetadata($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$blob = $dataTable->getSerialized(
|
||||
$this->maximumRowsInDataTable,
|
||||
$this->maximumRowsInSubDataTable,
|
||||
$this->columnToSortByBeforeTruncation);
|
||||
$this->getProcessor()->insertBlobRecord($recordName, $blob);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @return DataArray
|
||||
*/
|
||||
private function getDataArray($name)
|
||||
{
|
||||
if (empty($this->arrays[$name])) {
|
||||
$this->arrays[$name] = new DataArray();
|
||||
}
|
||||
|
||||
return $this->arrays[$name];
|
||||
}
|
||||
|
||||
private function aggregateImpressionRow($row)
|
||||
{
|
||||
foreach ($this->getRecordToDimensions() as $record => $dimensions) {
|
||||
$dataArray = $this->getDataArray($record);
|
||||
|
||||
$mainDimension = $dimensions[0];
|
||||
$mainLabel = $row[$mainDimension];
|
||||
|
||||
// content piece is optional
|
||||
if ($mainDimension == 'contentPiece'
|
||||
&& empty($mainLabel)) {
|
||||
$mainLabel = self::CONTENT_PIECE_NOT_SET;
|
||||
}
|
||||
|
||||
$dataArray->sumMetricsImpressions($mainLabel, $row);
|
||||
$this->rememberMetadataForRow($row, $mainLabel);
|
||||
|
||||
$subDimension = $dimensions[1];
|
||||
$subLabel = $row[$subDimension];
|
||||
|
||||
if (empty($subLabel)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// content piece is optional
|
||||
if ($subDimension == 'contentPiece'
|
||||
&& empty($subLabel)) {
|
||||
$subLabel = self::CONTENT_PIECE_NOT_SET;
|
||||
}
|
||||
|
||||
$dataArray->sumMetricsContentsImpressionPivot($mainLabel, $subLabel, $row);
|
||||
}
|
||||
}
|
||||
|
||||
private function aggregateInteractionRow($row)
|
||||
{
|
||||
foreach ($this->getRecordToDimensions() as $record => $dimensions) {
|
||||
$dataArray = $this->getDataArray($record);
|
||||
|
||||
$mainDimension = $dimensions[0];
|
||||
$mainLabel = $row[$mainDimension];
|
||||
|
||||
$dataArray->sumMetricsInteractions($mainLabel, $row);
|
||||
|
||||
$subDimension = $dimensions[1];
|
||||
$subLabel = $row[$subDimension];
|
||||
|
||||
if (empty($subLabel)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$dataArray->sumMetricsContentsInteractionPivot($mainLabel, $subLabel, $row);
|
||||
}
|
||||
}
|
||||
|
||||
private function rememberMetadataForRow($row, $mainLabel)
|
||||
{
|
||||
$this->metadata[$mainLabel] = array();
|
||||
|
||||
$target = $row['contentTarget'];
|
||||
if (empty($target)) {
|
||||
$target = Archiver::CONTENT_TARGET_NOT_SET;
|
||||
}
|
||||
|
||||
// there can be many different targets
|
||||
$this->metadata[$mainLabel]['contentTarget'] = $target;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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\Contents\Categories;
|
||||
|
||||
use Piwik\Category\Subcategory;
|
||||
|
||||
class ContentsSubcategory extends Subcategory
|
||||
{
|
||||
protected $categoryId = 'General_Actions';
|
||||
protected $id = 'Contents_Contents';
|
||||
protected $order = 45;
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?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\Contents\Columns;
|
||||
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Plugin\Dimension\ActionDimension;
|
||||
use Piwik\Plugins\Contents\Actions\ActionContent;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
|
||||
class ContentInteraction extends ActionDimension
|
||||
{
|
||||
protected $columnName = 'idaction_content_interaction';
|
||||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL';
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $acceptValues = 'The type of interaction with the content. For instance "click" or "submit".';
|
||||
protected $segmentName = 'contentInteraction';
|
||||
protected $nameSingular = 'Contents_ContentInteraction';
|
||||
protected $namePlural = 'Contents_ContentInteractions';
|
||||
protected $category = 'General_Actions';
|
||||
protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', $this->getActionId());
|
||||
}
|
||||
|
||||
public function getActionId()
|
||||
{
|
||||
return Action::TYPE_CONTENT_INTERACTION;
|
||||
}
|
||||
|
||||
public function onLookupAction(Request $request, Action $action)
|
||||
{
|
||||
if (!($action instanceof ActionContent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$interaction = $request->getParam('c_i');
|
||||
$interaction = trim($interaction);
|
||||
|
||||
if (strlen($interaction) > 0) {
|
||||
return $interaction;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
61
msd2/tracking/piwik/plugins/Contents/Columns/ContentName.php
Normal file
61
msd2/tracking/piwik/plugins/Contents/Columns/ContentName.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?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\Contents\Columns;
|
||||
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Plugin\Dimension\ActionDimension;
|
||||
use Piwik\Exception\InvalidRequestParameterException;
|
||||
use Piwik\Plugins\Contents\Actions\ActionContent;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
|
||||
class ContentName extends ActionDimension
|
||||
{
|
||||
protected $columnName = 'idaction_content_name';
|
||||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL';
|
||||
protected $segmentName = 'contentName';
|
||||
protected $nameSingular = 'Contents_ContentName';
|
||||
protected $namePlural = 'Contents_ContentNames';
|
||||
protected $acceptValues = 'The name of a content block, for instance "Ad Sale"';
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $category = 'General_Actions';
|
||||
protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', $this->getActionId());
|
||||
}
|
||||
|
||||
public function getActionId()
|
||||
{
|
||||
return Action::TYPE_CONTENT_NAME;
|
||||
}
|
||||
|
||||
public function onLookupAction(Request $request, Action $action)
|
||||
{
|
||||
if (!($action instanceof ActionContent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$contentName = $request->getParam('c_n');
|
||||
$contentName = trim($contentName);
|
||||
|
||||
if (strlen($contentName) > 0) {
|
||||
return $contentName;
|
||||
}
|
||||
|
||||
throw new InvalidRequestParameterException('Param `c_n` must not be empty or filled with whitespaces');
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?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\Contents\Columns;
|
||||
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Plugin\Dimension\ActionDimension;
|
||||
use Piwik\Plugins\Contents\Actions\ActionContent;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
|
||||
class ContentPiece extends ActionDimension
|
||||
{
|
||||
protected $columnName = 'idaction_content_piece';
|
||||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL';
|
||||
protected $segmentName = 'contentPiece';
|
||||
protected $nameSingular = 'Contents_ContentPiece';
|
||||
protected $namePlural = 'Contents_ContentPieces';
|
||||
protected $acceptValues = 'The actual content. For instance "ad.jpg" or "My text ad"';
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $category = 'General_Actions';
|
||||
protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', $this->getActionId());
|
||||
}
|
||||
|
||||
public function getActionId()
|
||||
{
|
||||
return Action::TYPE_CONTENT_PIECE;
|
||||
}
|
||||
|
||||
public function onLookupAction(Request $request, Action $action)
|
||||
{
|
||||
if (!($action instanceof ActionContent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$contentPiece = $request->getParam('c_p');
|
||||
$contentPiece = trim($contentPiece);
|
||||
|
||||
if (strlen($contentPiece) > 0) {
|
||||
return $contentPiece;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?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\Contents\Columns;
|
||||
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Plugin\Dimension\ActionDimension;
|
||||
use Piwik\Plugins\Contents\Actions\ActionContent;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
|
||||
class ContentTarget extends ActionDimension
|
||||
{
|
||||
protected $columnName = 'idaction_content_target';
|
||||
protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL';
|
||||
protected $type = self::TYPE_URL;
|
||||
protected $nameSingular = 'Contents_ContentTarget';
|
||||
protected $namePlural = 'Contents_ContentTargets';
|
||||
protected $segmentName = 'contentTarget';
|
||||
protected $category = 'General_Actions';
|
||||
protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment';
|
||||
protected $acceptValues = 'For instance the URL of a landing page: "http://landingpage.example.com"';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', $this->getActionId());
|
||||
}
|
||||
|
||||
public function getActionId()
|
||||
{
|
||||
return Action::TYPE_CONTENT_TARGET;
|
||||
}
|
||||
|
||||
public function onLookupAction(Request $request, Action $action)
|
||||
{
|
||||
if (!($action instanceof ActionContent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$contentTarget = $request->getParam('c_t');
|
||||
$contentTarget = trim($contentTarget);
|
||||
|
||||
if (strlen($contentTarget) > 0) {
|
||||
return $contentTarget;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
<?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\Contents\Columns\Metrics;
|
||||
|
||||
use Piwik\DataTable\Row;
|
||||
use Piwik\Metrics\Formatter;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\ProcessedMetric;
|
||||
|
||||
/**
|
||||
* The content interaction rate. Calculated as:
|
||||
*
|
||||
* nb_interactions / nb_impressions
|
||||
*
|
||||
* nb_interactions & nb_impressions are calculated by the Contents archiver.
|
||||
*/
|
||||
class InteractionRate extends ProcessedMetric
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
return 'interaction_rate';
|
||||
}
|
||||
|
||||
public function getTranslatedName()
|
||||
{
|
||||
return Piwik::translate('Contents_InteractionRate');
|
||||
}
|
||||
|
||||
public function getDocumentation()
|
||||
{
|
||||
return Piwik::translate('Contents_InteractionRateMetricDocumentation');
|
||||
}
|
||||
|
||||
public function compute(Row $row)
|
||||
{
|
||||
$interactions = $this->getMetric($row, 'nb_interactions');
|
||||
$impressions = $this->getMetric($row, 'nb_impressions');
|
||||
|
||||
return Piwik::getQuotientSafe($interactions, $impressions, $precision = 4);
|
||||
}
|
||||
|
||||
public function format($value, Formatter $formatter)
|
||||
{
|
||||
return $formatter->getPrettyPercentFromQuotient($value);
|
||||
}
|
||||
|
||||
public function getDependentMetrics()
|
||||
{
|
||||
return array('nb_interactions', 'nb_impressions');
|
||||
}
|
||||
}
|
62
msd2/tracking/piwik/plugins/Contents/Contents.php
Normal file
62
msd2/tracking/piwik/plugins/Contents/Contents.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?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\Contents;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class Contents extends \Piwik\Plugin
|
||||
{
|
||||
/**
|
||||
* @see \Piwik\Plugin::registerEvents
|
||||
*/
|
||||
public function registerEvents()
|
||||
{
|
||||
return array(
|
||||
'Metrics.getDefaultMetricTranslations' => 'addMetricTranslations',
|
||||
'Metrics.getDefaultMetricDocumentationTranslations' => 'addMetricDocumentationTranslations',
|
||||
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
|
||||
'Actions.getCustomActionDimensionFieldsAndJoins' => 'provideActionDimensionFields'
|
||||
);
|
||||
}
|
||||
|
||||
public function addMetricTranslations(&$translations)
|
||||
{
|
||||
$translations['nb_impressions'] = 'Contents_Impressions';
|
||||
$translations['nb_interactions'] = 'Contents_ContentInteractions';
|
||||
$translations['interaction_rate'] = 'Contents_InteractionRate';
|
||||
}
|
||||
|
||||
public function getJsFiles(&$jsFiles)
|
||||
{
|
||||
$jsFiles[] = "plugins/Contents/javascripts/contentsDataTable.js";
|
||||
}
|
||||
|
||||
public function addMetricDocumentationTranslations(&$translations)
|
||||
{
|
||||
$translations['nb_impressions'] = Piwik::translate('Contents_ImpressionsMetricDocumentation');
|
||||
$translations['nb_interactions'] = Piwik::translate('Contents_InteractionsMetricDocumentation');
|
||||
}
|
||||
|
||||
public function provideActionDimensionFields(&$fields, &$joins)
|
||||
{
|
||||
$fields[] = 'log_action_content_name.name as contentName';
|
||||
$fields[] = 'log_action_content_piece.name as contentPiece';
|
||||
$fields[] = 'log_action_content_target.name as contentTarget';
|
||||
$fields[] = 'log_action_content_interaction.name as contentInteraction';
|
||||
$joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_content_name
|
||||
ON log_link_visit_action.idaction_content_name = log_action_content_name.idaction';
|
||||
$joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_content_piece
|
||||
ON log_link_visit_action.idaction_content_piece = log_action_content_piece.idaction';
|
||||
$joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_content_target
|
||||
ON log_link_visit_action.idaction_content_target = log_action_content_target.idaction';
|
||||
$joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_content_interaction
|
||||
ON log_link_visit_action.idaction_content_interaction = log_action_content_interaction.idaction';
|
||||
}
|
||||
}
|
76
msd2/tracking/piwik/plugins/Contents/DataArray.php
Normal file
76
msd2/tracking/piwik/plugins/Contents/DataArray.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?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\Contents;
|
||||
|
||||
use Piwik\Metrics;
|
||||
|
||||
/**
|
||||
* The DataArray is a data structure used to aggregate datasets,
|
||||
* ie. sum arrays made of rows made of columns,
|
||||
* data from the logs is stored in a DataArray before being converted in a DataTable
|
||||
*
|
||||
*/
|
||||
|
||||
class DataArray extends \Piwik\DataArray
|
||||
{
|
||||
public function sumMetricsImpressions($label, $row)
|
||||
{
|
||||
if (!isset($this->data[$label])) {
|
||||
$this->data[$label] = self::makeEmptyContentsRow();
|
||||
}
|
||||
$this->doSumContentsImpressionMetrics($row, $this->data[$label]);
|
||||
}
|
||||
|
||||
public function sumMetricsInteractions($label, $row)
|
||||
{
|
||||
if (!isset($this->data[$label])) {
|
||||
return; // do igonre interactions that do not have an impression
|
||||
}
|
||||
$this->doSumContentsInteractionMetrics($row, $this->data[$label]);
|
||||
}
|
||||
|
||||
protected static function makeEmptyContentsRow()
|
||||
{
|
||||
return array(
|
||||
Metrics::INDEX_NB_UNIQ_VISITORS => 0,
|
||||
Metrics::INDEX_NB_VISITS => 0,
|
||||
Metrics::INDEX_CONTENT_NB_IMPRESSIONS => 0,
|
||||
Metrics::INDEX_CONTENT_NB_INTERACTIONS => 0
|
||||
);
|
||||
}
|
||||
|
||||
protected function doSumContentsImpressionMetrics($newRowToAdd, &$oldRowToUpdate)
|
||||
{
|
||||
$oldRowToUpdate[Metrics::INDEX_NB_VISITS] += $newRowToAdd[Metrics::INDEX_NB_VISITS];
|
||||
$oldRowToUpdate[Metrics::INDEX_NB_UNIQ_VISITORS] += $newRowToAdd[Metrics::INDEX_NB_UNIQ_VISITORS];
|
||||
$oldRowToUpdate[Metrics::INDEX_CONTENT_NB_IMPRESSIONS] += $newRowToAdd[Metrics::INDEX_CONTENT_NB_IMPRESSIONS];
|
||||
}
|
||||
|
||||
protected function doSumContentsInteractionMetrics($newRowToAdd, &$oldRowToUpdate)
|
||||
{
|
||||
$oldRowToUpdate[Metrics::INDEX_CONTENT_NB_INTERACTIONS] += $newRowToAdd[Metrics::INDEX_CONTENT_NB_INTERACTIONS];
|
||||
}
|
||||
|
||||
public function sumMetricsContentsImpressionPivot($parentLabel, $label, $row)
|
||||
{
|
||||
if (!isset($this->dataTwoLevels[$parentLabel][$label])) {
|
||||
$this->dataTwoLevels[$parentLabel][$label] = $this->makeEmptyContentsRow();
|
||||
}
|
||||
$this->doSumContentsImpressionMetrics($row, $this->dataTwoLevels[$parentLabel][$label]);
|
||||
}
|
||||
|
||||
public function sumMetricsContentsInteractionPivot($parentLabel, $label, $row)
|
||||
{
|
||||
if (!isset($this->dataTwoLevels[$parentLabel][$label])) {
|
||||
return; // do igonre interactions that do not have an impression
|
||||
}
|
||||
$this->doSumContentsInteractionMetrics($row, $this->dataTwoLevels[$parentLabel][$label]);
|
||||
}
|
||||
|
||||
}
|
33
msd2/tracking/piwik/plugins/Contents/Dimensions.php
Normal file
33
msd2/tracking/piwik/plugins/Contents/Dimensions.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?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\Contents;
|
||||
|
||||
class Dimensions
|
||||
{
|
||||
public static function getRecordNameForAction($apiMethod)
|
||||
{
|
||||
$apiToRecord = array(
|
||||
'getContentNames' => Archiver::CONTENTS_NAME_PIECE_RECORD_NAME,
|
||||
'getContentPieces' => Archiver::CONTENTS_PIECE_NAME_RECORD_NAME
|
||||
);
|
||||
|
||||
return $apiToRecord[$apiMethod];
|
||||
}
|
||||
|
||||
public static function getSubtableLabelForApiMethod($apiMethod)
|
||||
{
|
||||
$labelToMethod = array(
|
||||
'getContentNames' => 'Contents_ContentPiece',
|
||||
'getContentPieces' => 'Contents_ContentName'
|
||||
);
|
||||
|
||||
return $labelToMethod[$apiMethod];
|
||||
}
|
||||
|
||||
}
|
18
msd2/tracking/piwik/plugins/Contents/README.md
Normal file
18
msd2/tracking/piwik/plugins/Contents/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Piwik Contents Plugin
|
||||
|
||||
## Description
|
||||
|
||||
Add your plugin description here.
|
||||
|
||||
## FAQ
|
||||
|
||||
__My question?__
|
||||
My answer
|
||||
|
||||
## Changelog
|
||||
|
||||
Here goes the changelog text.
|
||||
|
||||
## Support
|
||||
|
||||
Please direct any feedback to ...
|
70
msd2/tracking/piwik/plugins/Contents/Reports/Base.php
Normal file
70
msd2/tracking/piwik/plugins/Contents/Reports/Base.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?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\Contents\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Report;
|
||||
use Piwik\Plugin\ViewDataTable;
|
||||
use Piwik\Plugins\Contents\Dimensions;
|
||||
use Piwik\Report\ReportWidgetFactory;
|
||||
use Piwik\Widget\WidgetsList;
|
||||
|
||||
abstract class Base extends Report
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->categoryId = 'General_Actions';
|
||||
$this->subcategoryId = 'Contents_Contents';
|
||||
}
|
||||
|
||||
public function configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
|
||||
{
|
||||
$widget = $factory->createWidget();
|
||||
|
||||
$widgetsList->addToContainerWidget('Contents', $widget);
|
||||
}
|
||||
|
||||
/**
|
||||
* Here you can configure how your report should be displayed. For instance whether your report supports a search
|
||||
* etc. You can also change the default request config. For instance change how many rows are displayed by default.
|
||||
*
|
||||
* @param ViewDataTable $view
|
||||
*/
|
||||
public function configureView(ViewDataTable $view)
|
||||
{
|
||||
$view->config->datatable_js_type = 'ContentsDataTable';
|
||||
$view->config->datatable_css_class = 'ContentsDataTable';
|
||||
|
||||
if (!empty($this->dimension)) {
|
||||
$view->config->addTranslations(array('label' => $this->dimension->getName()));
|
||||
}
|
||||
|
||||
$view->config->columns_to_display = array_merge(
|
||||
array('label'),
|
||||
array_keys($this->getMetrics()),
|
||||
array_keys($this->getProcessedMetrics())
|
||||
);
|
||||
|
||||
$view->requestConfig->filter_sort_column = 'nb_impressions';
|
||||
|
||||
if ($this->hasSubtableId()) {
|
||||
$apiMethod = $view->requestConfig->getApiMethodToRequest();
|
||||
$label = Dimensions::getSubtableLabelForApiMethod($apiMethod);
|
||||
$view->config->addTranslation('label', Piwik::translate($label));
|
||||
}
|
||||
}
|
||||
|
||||
private function hasSubtableId()
|
||||
{
|
||||
$subtable = Common::getRequestVar('idSubtable', false, 'integer');
|
||||
|
||||
return !empty($subtable);
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?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\Contents\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Report;
|
||||
use Piwik\Plugins\Contents\Columns\ContentName;
|
||||
use Piwik\Plugins\Contents\Columns\Metrics\InteractionRate;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* This class defines a new report.
|
||||
*
|
||||
* See {@link http://developer.piwik.org/api-reference/Piwik/Plugin/Report} for more information.
|
||||
*/
|
||||
class GetContentNames extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->name = Piwik::translate('Contents_ContentName');
|
||||
$this->dimension = null;
|
||||
// TODO $this->documentation = Piwik::translate('ContentsDocumentation');
|
||||
$this->dimension = new ContentName();
|
||||
$this->order = 35;
|
||||
$this->actionToLoadSubTables = 'getContentNames';
|
||||
|
||||
$this->metrics = array('nb_impressions', 'nb_interactions');
|
||||
$this->processedMetrics = array(new InteractionRate());
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<?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\Contents\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Report;
|
||||
use Piwik\Plugins\Contents\Columns\ContentPiece;
|
||||
use Piwik\Plugins\Contents\Columns\Metrics\InteractionRate;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* This class defines a new report.
|
||||
*
|
||||
* See {@link http://developer.piwik.org/api-reference/Piwik/Plugin/Report} for more information.
|
||||
*/
|
||||
class GetContentPieces extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->name = Piwik::translate('Contents_ContentPiece');
|
||||
$this->dimension = null;
|
||||
// TODO $this->documentation = Piwik::translate('ContentsDocumentation');
|
||||
$this->dimension = new ContentPiece();
|
||||
$this->order = 36;
|
||||
$this->actionToLoadSubTables = 'getContentPieces';
|
||||
|
||||
$this->metrics = array('nb_impressions', 'nb_interactions');
|
||||
$this->processedMetrics = array(new InteractionRate());
|
||||
}
|
||||
}
|
50
msd2/tracking/piwik/plugins/Contents/VisitorDetails.php
Normal file
50
msd2/tracking/piwik/plugins/Contents/VisitorDetails.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?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\Contents;
|
||||
|
||||
use Piwik\Plugins\Live\VisitorDetailsAbstract;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\View;
|
||||
|
||||
class VisitorDetails extends VisitorDetailsAbstract
|
||||
{
|
||||
public function extendActionDetails(&$action, $nextAction, $visitorDetails)
|
||||
{
|
||||
if ($action['type'] != Action::TYPE_CONTENT) {
|
||||
unset($action['contentName']);
|
||||
unset($action['contentPiece']);
|
||||
unset($action['contentTarget']);
|
||||
unset($action['contentInteraction']);
|
||||
}
|
||||
}
|
||||
|
||||
public function renderAction($action, $previousAction, $visitorDetails)
|
||||
{
|
||||
if ($action['type'] != Action::TYPE_CONTENT) {
|
||||
return;
|
||||
}
|
||||
|
||||
$view = new View('@Contents/_actionContent.twig');
|
||||
$view->action = $action;
|
||||
$view->previousAction = $previousAction;
|
||||
$view->visitInfo = $visitorDetails;
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function renderActionTooltip($action, $visitInfo)
|
||||
{
|
||||
if ($action['type'] != Action::TYPE_CONTENT) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$view = new View('@Contents/_actionTooltip');
|
||||
$view->action = $action;
|
||||
return [[ 10, $view->render() ]];
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?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\Contents\Widgets;
|
||||
|
||||
use Piwik\Plugins\CoreHome\CoreHome;
|
||||
use Piwik\Widget\WidgetContainerConfig;
|
||||
|
||||
class ContentsByDimension extends WidgetContainerConfig
|
||||
{
|
||||
protected $layout = CoreHome::WIDGET_CONTAINER_LAYOUT_BY_DIMENSION;
|
||||
protected $id = 'Contents';
|
||||
protected $categoryId = 'General_Actions';
|
||||
protected $subcategoryId = 'Contents_Contents';
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
(function ($, require) {
|
||||
|
||||
var exports = require('piwik/UI'),
|
||||
DataTable = exports.DataTable,
|
||||
dataTablePrototype = DataTable.prototype;
|
||||
|
||||
/**
|
||||
* UI control that handles extra functionality for Actions datatables.
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
exports.ContentsDataTable = function (element) {
|
||||
DataTable.call(this, element);
|
||||
};
|
||||
|
||||
$.extend(exports.ContentsDataTable.prototype, dataTablePrototype, {
|
||||
|
||||
//see dataTable::bindEventsAndApplyStyle
|
||||
_init: function (domElem) {
|
||||
domElem.find('table > tbody > tr').each(function (index, tr) {
|
||||
var $tr = $(tr);
|
||||
var $td = $tr.find('.label .value');
|
||||
var text = $td.text().trim();
|
||||
|
||||
if (text.search('^https?:\/\/[^\/]+') !== -1) {
|
||||
if (text.match(/(.jpg|.gif|.png|.svg)$/)) {
|
||||
if (window.encodeURI) {
|
||||
text = window.encodeURI(text);
|
||||
}
|
||||
$td.tooltip({
|
||||
track: true,
|
||||
items: 'span',
|
||||
content: '<p><img style="max-width: 150px;max-height:150px;" src="' + text + '"/><br />' + text + '</p>',
|
||||
tooltipClass: 'rowActionTooltip',
|
||||
show: false,
|
||||
hide: false
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery, require);
|
8
msd2/tracking/piwik/plugins/Contents/lang/ar.json
Normal file
8
msd2/tracking/piwik/plugins/Contents/lang/ar.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "طباعة",
|
||||
"InteractionRate": "نسبة المشاركة",
|
||||
"ContentPiece": "جزء من المحتوى",
|
||||
"Contents": "عنوان المحتوى"
|
||||
}
|
||||
}
|
9
msd2/tracking/piwik/plugins/Contents/lang/bg.json
Normal file
9
msd2/tracking/piwik/plugins/Contents/lang/bg.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Импресии",
|
||||
"InteractionRate": "Честота на взаимодействие",
|
||||
"ContentName": "Име на съдържанието",
|
||||
"ContentTarget": "Целево съдържание",
|
||||
"Contents": "Съдържание"
|
||||
}
|
||||
}
|
6
msd2/tracking/piwik/plugins/Contents/lang/ca.json
Normal file
6
msd2/tracking/piwik/plugins/Contents/lang/ca.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Contents": {
|
||||
"ContentName": "Nom del contingut",
|
||||
"Contents": "Continguts"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/cs.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/cs.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Sledování obsahu a bannerů vám umožňuje měřit výkon (zobrazení, kliknutí, CTR) libovolného obsahu na vašich stránkách (bannerová reklama, obrázek, libovolná položka).",
|
||||
"Impressions": "Zobrazení",
|
||||
"ContentImpression": "Zobrazení obsahu",
|
||||
"ContentInteraction": "Interakce s obsahem",
|
||||
"ContentInteractions": "Interakce s obsahem",
|
||||
"InteractionRate": "Rychlost interakcí",
|
||||
"ContentName": "Jméno obsahu",
|
||||
"ContentNames": "Názvy obsahu",
|
||||
"ContentPiece": "Část obsahu",
|
||||
"ContentPieces": "Části obsahu",
|
||||
"ContentTarget": "Cíl obsahu",
|
||||
"ContentTargets": "Cíle obsahu",
|
||||
"Contents": "Obsah",
|
||||
"InteractionsMetricDocumentation": "Kolikrát bylo s blokem obsahu interagováno (t. j. kliknuto na banner nebo reklamu).",
|
||||
"ImpressionsMetricDocumentation": "Počet zobrazení banneru nebo reklamy na stránkách.",
|
||||
"InteractionRateMetricDocumentation": "Poměr impresí obsahu k interakcím."
|
||||
}
|
||||
}
|
18
msd2/tracking/piwik/plugins/Contents/lang/da.json
Normal file
18
msd2/tracking/piwik/plugins/Contents/lang/da.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Indhold og banner sporing gør dig i stand til at måle effektiviteten (besøg, klik, CTR) af ethvert indhold på dine sider (bannerreklamer, billeder, hvad som helst).",
|
||||
"Impressions": "Visninger",
|
||||
"ContentImpression": "Indholdsvisning",
|
||||
"ContentInteraction": "Interaktion med indhold",
|
||||
"ContentInteractions": "Interaktion med indhold",
|
||||
"InteractionRate": "Interaktionsfrekvens",
|
||||
"ContentName": "Indholdsnavn",
|
||||
"ContentNames": "Indholdsnavne",
|
||||
"ContentPiece": "Indholdsstykke",
|
||||
"ContentTarget": "Indholdsmål",
|
||||
"Contents": "Indhold",
|
||||
"InteractionsMetricDocumentation": "Antal gange der er blevet interageret på et indhold (f.eks. et klik på et banner eller en reklame).",
|
||||
"ImpressionsMetricDocumentation": "Antal gange et indhold, som f.eks. et banner eller en reklame er vist på en side.",
|
||||
"InteractionRateMetricDocumentation": "Forholdet mellem indholdsvisninger til interaktioner."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/de.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/de.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Content- und Banner-Tracking gibt Ihnen die Möglichkeit, die Performance (Ansichten, Klicks, CTR) von einem beliebigen Stück Content (Banner-Werbung, Bild, beliebiges Element) auf Ihrer Seite zu messen.",
|
||||
"Impressions": "Impressionen",
|
||||
"ContentImpression": "Inhaltsimpression",
|
||||
"ContentInteraction": "Inhaltsinteraktion",
|
||||
"ContentInteractions": "Inhaltsinteraktionen",
|
||||
"InteractionRate": "Interaktionsrate",
|
||||
"ContentName": "Inhaltsname",
|
||||
"ContentNames": "Inhaltnamen",
|
||||
"ContentPiece": "Inhaltsteil",
|
||||
"ContentPieces": "Inhaltteile",
|
||||
"ContentTarget": "Inhaltsziel",
|
||||
"ContentTargets": "Inhaltziele",
|
||||
"Contents": "Inhalte",
|
||||
"InteractionsMetricDocumentation": "Die Anzahl, wie häufig mit einem Inhalt interagiert wurde (z.B. durch einen Klick auf ein Banner oder eine Anzeige).",
|
||||
"ImpressionsMetricDocumentation": "Die Anzahl, wie häufig ein Inhalt, z.b. ein Banner oder eine Anzeige, auf der Seite angezeigt wurden.",
|
||||
"InteractionRateMetricDocumentation": "Verhältnis zwischen Impressionen des Inhalts und Interaktionen."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/el.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/el.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Η παρακολούθηση περιεχομένου και εικόνων επιτρέπει να μετράτε την απόδοση (επισκέψεις, κλικ, CTR) οποιουδήποτε είδους περιεχομένου των σελίδων σας (εικόνες διαφημίσεων, εικόνες, οποιαδήποτε αντικείμενα).",
|
||||
"Impressions": "Αποτυπώσεις",
|
||||
"ContentImpression": "Αποτύπωμα Περιεχομένου",
|
||||
"ContentInteraction": "Αλληλεπίδραση σε Περιεχόμενο",
|
||||
"ContentInteractions": "Αλληλεπιδράσεις σε Περιεχόμενο",
|
||||
"InteractionRate": "Ρυθμός αλληλεπίδρασης",
|
||||
"ContentName": "Όνομα Περιεχομένου",
|
||||
"ContentNames": "Ονόματα περιεχομένου",
|
||||
"ContentPiece": "Κομμάτι Περιεχομένου",
|
||||
"ContentPieces": "Τεμάχια περιεχομένου",
|
||||
"ContentTarget": "Στόχος Περιεχομένου",
|
||||
"ContentTargets": "Στόχοι περιεχομένου",
|
||||
"Contents": "Περιεχόμενα",
|
||||
"InteractionsMetricDocumentation": "Ο αριθμός αλληλεπιδράσεων σε ένα μπλοκ περιεχομένου (πχ. ένα 'κλικ' σε μια εικόνα ή διαφήμιση).",
|
||||
"ImpressionsMetricDocumentation": "Ο αριθμός εμφανίσεων σε μια σελίδα ενός μπλοκ περιεχομένου, όπως μια εικόνα ή διαφήμιση.",
|
||||
"InteractionRateMetricDocumentation": "Ο λόγος Εμφανίσεων περιεχομένου προς Αλληλεπιδράσεις."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/en.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/en.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Content and banner tracking lets you measure the performance (views, clicks, CTR) of any piece of content on your pages (Banner ad, image, any item).",
|
||||
"Impressions": "Impressions",
|
||||
"ContentImpression": "Content Impression",
|
||||
"ContentInteraction": "Content Interaction",
|
||||
"ContentInteractions": "Content Interactions",
|
||||
"InteractionRate": "Interaction Rate",
|
||||
"ContentName": "Content Name",
|
||||
"ContentNames": "Content Names",
|
||||
"ContentPiece": "Content Piece",
|
||||
"ContentPieces": "Content Pieces",
|
||||
"ContentTarget": "Content Target",
|
||||
"ContentTargets": "Content Targets",
|
||||
"Contents": "Contents",
|
||||
"InteractionsMetricDocumentation": "The number of times a content block was interacted with (eg, a 'click' on a banner or ad).",
|
||||
"ImpressionsMetricDocumentation": "The number of times a content block, such as a banner or an ad, was displayed on a page.",
|
||||
"InteractionRateMetricDocumentation": "The ratio of content impressions to interactions."
|
||||
}
|
||||
}
|
16
msd2/tracking/piwik/plugins/Contents/lang/es-ar.json
Normal file
16
msd2/tracking/piwik/plugins/Contents/lang/es-ar.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "El seguimiento de báner y contenido te permite medir tu rendimiento (vistas, clics, etc) de cualquier pieza de contenido en tus páginas (publicidad en báner, imagen, cualquier elemento).",
|
||||
"Impressions": "Impresiones",
|
||||
"ContentInteraction": "Interacción de contenido",
|
||||
"ContentInteractions": "Interacciones de contenido",
|
||||
"InteractionRate": "Tasa de interacción",
|
||||
"ContentName": "Nombre del contenido",
|
||||
"ContentPiece": "Pieza del contenido",
|
||||
"ContentTarget": "Objetivo del contenido",
|
||||
"Contents": "Contenidos",
|
||||
"InteractionsMetricDocumentation": "El número de veces con que un bloque de contenido interactuó (por ejemplo, un clic en un báner o publicidad).",
|
||||
"ImpressionsMetricDocumentation": "El número de veces que un bloque de contenido, como un báner o una publicidad, fue mostrado en una página.",
|
||||
"InteractionRateMetricDocumentation": "La tasa entre las impresiones del contenido y las interacciones."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/es.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/es.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "El contenido y el monitoreo de anuncios le permite medir el rendimiento (visitas, clics, CTR) de cualquier pieza de contenido en sus páginas (anuncios publicitarios, imágenes, cualquier elemento).",
|
||||
"Impressions": "Impresiones",
|
||||
"ContentImpression": "Impresiones de contenido",
|
||||
"ContentInteraction": "Interacción con el contenido",
|
||||
"ContentInteractions": "Interacciones con el contenido",
|
||||
"InteractionRate": "Nivel de interacción",
|
||||
"ContentName": "Nombre del contenido",
|
||||
"ContentNames": "Nombres de contenidos",
|
||||
"ContentPiece": "Pieza de contenido",
|
||||
"ContentPieces": "Piezas de contenido",
|
||||
"ContentTarget": "Objetivo del contenido",
|
||||
"ContentTargets": "Objetivos de contenido",
|
||||
"Contents": "Contenidos",
|
||||
"InteractionsMetricDocumentation": "El número de veces que se interactuo con un bloque de contenido (ej, un 'clic' en un banner o anuncio).",
|
||||
"ImpressionsMetricDocumentation": "El número de veces que un bloque de contenido, como un banner o un anuncio, fue mostrado en una página.",
|
||||
"InteractionRateMetricDocumentation": "La proporción de impresiones de contenido a interacciones."
|
||||
}
|
||||
}
|
8
msd2/tracking/piwik/plugins/Contents/lang/et.json
Normal file
8
msd2/tracking/piwik/plugins/Contents/lang/et.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Contents": {
|
||||
"InteractionRate": "Koostoime mõju",
|
||||
"ContentName": "Sisu nimi",
|
||||
"ContentPiece": "Sisu tükk",
|
||||
"Contents": "Sisud"
|
||||
}
|
||||
}
|
14
msd2/tracking/piwik/plugins/Contents/lang/fi.json
Normal file
14
msd2/tracking/piwik/plugins/Contents/lang/fi.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Näkymät",
|
||||
"ContentInteraction": "Sisällön interaktio",
|
||||
"ContentInteractions": "Sisällön interaktiot",
|
||||
"InteractionRate": "Interaktioiden määrä",
|
||||
"ContentName": "Sisällön nimi",
|
||||
"ContentNames": "Sisällön nimet",
|
||||
"ContentPiece": "Sisällön osa",
|
||||
"ContentTarget": "Sisällön kohde",
|
||||
"ContentTargets": "Sisällön kohteet",
|
||||
"Contents": "Sisällöt"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/fr.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/fr.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Le suivi de contenu et de bannière vous permet de mesurer la performance (vues, clics, CTR) de chaque partie du contenu de vos pages (bannière de pub, image, tout élément).",
|
||||
"Impressions": "Impressions",
|
||||
"ContentImpression": "Affichage du contenu",
|
||||
"ContentInteraction": "Action du contenu",
|
||||
"ContentInteractions": "Actions du contenu",
|
||||
"InteractionRate": "Taux d'interaction",
|
||||
"ContentName": "Nom du contenu",
|
||||
"ContentNames": "Noms du contenu",
|
||||
"ContentPiece": "Partie du contenu",
|
||||
"ContentPieces": "Portions de contenu",
|
||||
"ContentTarget": "Cible du contenu",
|
||||
"ContentTargets": "Cibles de contenu",
|
||||
"Contents": "Contenus",
|
||||
"InteractionsMetricDocumentation": "Nombre de fois où un bloc de contenu a subi une interaction (ex un click sur une bannière ou sur une publicité).",
|
||||
"ImpressionsMetricDocumentation": "Le nombre de fois qu'un bloc de contenu tel qu'une bannière ou une publicité a été affiché sur la page.",
|
||||
"InteractionRateMetricDocumentation": "Le ratio entre les impressions de contenu et les interactions."
|
||||
}
|
||||
}
|
7
msd2/tracking/piwik/plugins/Contents/lang/gl.json
Normal file
7
msd2/tracking/piwik/plugins/Contents/lang/gl.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Impresións",
|
||||
"ContentName": "Nome do contido",
|
||||
"Contents": "Contido"
|
||||
}
|
||||
}
|
11
msd2/tracking/piwik/plugins/Contents/lang/hi.json
Normal file
11
msd2/tracking/piwik/plugins/Contents/lang/hi.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "सामग्री और बैनर पर नज़र रखने से आप किसी भी अपने पृष्ठों पर सामग्री का टुकड़ा (बैनर विज्ञापन, छवि, किसी भी आइटम) का प्रदर्शन (विचारों, क्लिक, CTR) को मापने की सुविधा देता है।",
|
||||
"Impressions": "छापे",
|
||||
"InteractionRate": "सहभागिता दर",
|
||||
"ContentName": "सामग्री का नाम",
|
||||
"ContentPiece": "सामग्री टुकड़ा",
|
||||
"ContentTarget": "सामग्री को लक्षित",
|
||||
"Contents": "अंतर्वस्तु"
|
||||
}
|
||||
}
|
11
msd2/tracking/piwik/plugins/Contents/lang/id.json
Normal file
11
msd2/tracking/piwik/plugins/Contents/lang/id.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Impresi",
|
||||
"ContentInteraction": "Interaksi Konten",
|
||||
"ContentInteractions": "Interaksi Konten",
|
||||
"InteractionRate": "Nilai Interaksi",
|
||||
"ContentName": "Nama Konten",
|
||||
"ContentPiece": "Potongan Konten",
|
||||
"Contents": "Konten"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/it.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/it.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Il tracciamento di contenuto e banner ti consente di misurare le prestazioni (visite, clicks, CTR) di ciascuna porzione di contenuto delle tue pagine (Banner ad, immagini, ogni elemento).",
|
||||
"Impressions": "Impressioni",
|
||||
"ContentImpression": "Impressioni Contenuto",
|
||||
"ContentInteraction": "Interazione Contenuto",
|
||||
"ContentInteractions": "Interazioni Contenuto",
|
||||
"InteractionRate": "Rapporto di Interazioni",
|
||||
"ContentName": "Nome Contenuto",
|
||||
"ContentNames": "Nomi Contenuto",
|
||||
"ContentPiece": "Pezzo del Contenuto",
|
||||
"ContentPieces": "Pezzi Contenuto",
|
||||
"ContentTarget": "Obiettivo del Contenuto",
|
||||
"ContentTargets": "Target Contenuto",
|
||||
"Contents": "Contenuti",
|
||||
"InteractionsMetricDocumentation": "Numero di volte in cui si è interagito con un blocco di contenuto (es. un 'click' su un banner o una inserzione).",
|
||||
"ImpressionsMetricDocumentation": "Numero di volte in cui un blocco di contenuto, come un banner o una inserzione, è stato mostrato in una pagina.",
|
||||
"InteractionRateMetricDocumentation": "Rapporto tra impressioni contenuto e interazioni."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/ja.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/ja.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "コンテンツとバナートラッキングでは、ページ上のコンテンツ ( バナー広告、画像、アイテム ) のパフォーマンス ( 表示、クリック、クリック率 ) を測定できます。",
|
||||
"Impressions": "インプレッション",
|
||||
"ContentImpression": "コンテンツインプレッション",
|
||||
"ContentInteraction": "コンテンツインタラクション",
|
||||
"ContentInteractions": "コンテンツインタラクション",
|
||||
"InteractionRate": "インタラクション率",
|
||||
"ContentName": "コンテンツ名",
|
||||
"ContentNames": "コンテンツ名",
|
||||
"ContentPiece": "コンテンツ要素",
|
||||
"ContentPieces": "コンテンツ要素",
|
||||
"ContentTarget": "コンテンツターゲット",
|
||||
"ContentTargets": "コンテンツターゲット",
|
||||
"Contents": "コンテンツ",
|
||||
"InteractionsMetricDocumentation": "コンテンツブロックが操作された回数(バナーや広告の ' クリック ' など)。",
|
||||
"ImpressionsMetricDocumentation": "広告やバナーなどのコンテンツブロックがページに表示された回数。",
|
||||
"InteractionRateMetricDocumentation": "インタラクションに対するコンテンツインプレッションの比率。"
|
||||
}
|
||||
}
|
16
msd2/tracking/piwik/plugins/Contents/lang/ko.json
Normal file
16
msd2/tracking/piwik/plugins/Contents/lang/ko.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "컨텐츠와 배너 트래킹으로 당신의 페이지들(배너광고, 이미지, 각종 아이템)상에서의 각각의 컨텐츠의 퍼포먼스(뷰들, 클릭수들, CTR) 를 측정할 수 있습니다",
|
||||
"Impressions": "뷰들",
|
||||
"ContentInteraction": "컨텐츠 상호교환",
|
||||
"ContentInteractions": "컨텐츠 상호교환들",
|
||||
"InteractionRate": "상호 작용 비율",
|
||||
"ContentName": "콘텐츠 이름",
|
||||
"ContentPiece": "콘텐츠 조각",
|
||||
"ContentTarget": "콘텐츠 목표",
|
||||
"Contents": "콘텐츠",
|
||||
"InteractionsMetricDocumentation": "(배너나 광고의 '클릭')과 상호작용한 콘텐츠 블록의 횟수입니다.",
|
||||
"ImpressionsMetricDocumentation": "배너나 광고와 같은 콘텐츠 블록이 보여진 횟수입니다.",
|
||||
"InteractionRateMetricDocumentation": "상호작용으로 인해 보여진 페이지들의 비율"
|
||||
}
|
||||
}
|
14
msd2/tracking/piwik/plugins/Contents/lang/nb.json
Normal file
14
msd2/tracking/piwik/plugins/Contents/lang/nb.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Innholds- og bannersporing lar deg måle ytelsen (visninger, klikk, CTR) til deler av innholdet på dine sider (banner-annonser, bilder, eller hva som helst).",
|
||||
"Impressions": "Visninger",
|
||||
"InteractionRate": "Interaksjonsrate",
|
||||
"ContentName": "Innholdsnavn",
|
||||
"ContentPiece": "Innholdsdel",
|
||||
"ContentTarget": "Innholdsmål",
|
||||
"Contents": "Innhold",
|
||||
"InteractionsMetricDocumentation": "Antall ganger en innholdsdel ble interagert med (f.eks. et klikk på en banner eller annonse).",
|
||||
"ImpressionsMetricDocumentation": "Antall ganger en innholdsdel, som en banner eller annonse, ble vist på en side.",
|
||||
"InteractionRateMetricDocumentation": "Ratioen mellom visninger og interaksjoner."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/nl.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/nl.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Met content- en bannertracking meet je de prestaties (bezoeken, kliks, ctr) van elk stukje content op je webpagina (banner, tekstadvertentie, plaatje).",
|
||||
"Impressions": "Vertoningen",
|
||||
"ContentImpression": "Inhoud Impressies",
|
||||
"ContentInteraction": "Content interacties",
|
||||
"ContentInteractions": "Content interacties",
|
||||
"InteractionRate": "Aantal interacties",
|
||||
"ContentName": "Content naam",
|
||||
"ContentNames": "Inhoud Namen",
|
||||
"ContentPiece": "Contentonderdeel",
|
||||
"ContentPieces": "Inhoud Gedeeltes",
|
||||
"ContentTarget": "Contentdoel",
|
||||
"ContentTargets": "Inhoud Doelen",
|
||||
"Contents": "Contentbronnen",
|
||||
"InteractionsMetricDocumentation": "Het aantal keer dat er interactie was met een contentbron (bijvoorbeeld een klik op een banner of advertentie).",
|
||||
"ImpressionsMetricDocumentation": "Het aantal keer dat een contentbron, zoals een banner of een advertentie, was getoond op een pagina.",
|
||||
"InteractionRateMetricDocumentation": "De verhouding tussen vertoningen en kliks."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/pl.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/pl.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Śledzenie treści i banerów pozwala Ci zmierzyć wydajność (wyświetleń, kliknięć, CTR) dowolnego fragmentu treści na Twojej stronie (baner reklamowy, obrazek, dowolny element).",
|
||||
"Impressions": "Wyświetlenia treści",
|
||||
"ContentImpression": "Wyświetlenia treści",
|
||||
"ContentInteraction": "Interakcja",
|
||||
"ContentInteractions": "Interakcje",
|
||||
"InteractionRate": "Częstość interakcji",
|
||||
"ContentName": "Nazwa treści",
|
||||
"ContentNames": "Nazwy treści",
|
||||
"ContentPiece": "Fragment treści",
|
||||
"ContentPieces": "Fragmenty treści",
|
||||
"ContentTarget": "Cel treści",
|
||||
"ContentTargets": "Cele treści",
|
||||
"Contents": "Treść",
|
||||
"InteractionsMetricDocumentation": "Liczba interakcji wykonanych na zawartości (np. 'kliknięcie' w baner lub reklamę).",
|
||||
"ImpressionsMetricDocumentation": "Liczba wyświetleń bloku treści, takiego jak baner czy reklama, na stronie.",
|
||||
"InteractionRateMetricDocumentation": "Stosunek wyświetleń treści do interakcji"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/pt-br.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/pt-br.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "O rastreamento de conteúdo e banner permite que meça o desempenho (visualizações, cliques, CTR) de qualquer parte do conteúdo em suas páginas (Banner de anúncio, imagem, qualquer item).",
|
||||
"Impressions": "Impressões",
|
||||
"ContentImpression": "Impressão de Conteúdo",
|
||||
"ContentInteraction": "Interação de Conteúdo",
|
||||
"ContentInteractions": "Interação de Conteúdos",
|
||||
"InteractionRate": "Taxa de interação",
|
||||
"ContentName": "Nome do conteúdo",
|
||||
"ContentNames": "Nomes de Conteúdo",
|
||||
"ContentPiece": "Parte do conteúdo",
|
||||
"ContentPieces": "Peças de Conteúdo",
|
||||
"ContentTarget": "Destino do conteúdo",
|
||||
"ContentTargets": "Metas de Conteúdo",
|
||||
"Contents": "Conteúdos",
|
||||
"InteractionsMetricDocumentation": "O número de vezes que interagiram com um bloco de conteúdo (e.g., um 'clique' em um banner ou anúncio).",
|
||||
"ImpressionsMetricDocumentation": "O número de vezes que um bloco de conteúdo, como um banner ou um anúncio, foi exibido em uma página.",
|
||||
"InteractionRateMetricDocumentation": "A proporção de impressões de conteúdo para interações."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/pt.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/pt.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "O acompanhamento de conteúdo e banner permite-lhe medir a performance (visualizações, cliques, CTR) de qualquer pedaço de conteúdo nas suas páginas (banner de publicidade, imagem, qualquer item).",
|
||||
"Impressions": "Impressões",
|
||||
"ContentImpression": "Impressão de conteúdo",
|
||||
"ContentInteraction": "Interação de conteúdo",
|
||||
"ContentInteractions": "Interações de conteúdo",
|
||||
"InteractionRate": "Taxa de interação",
|
||||
"ContentName": "Nome do conteúdo",
|
||||
"ContentNames": "Nomes do conteúdo",
|
||||
"ContentPiece": "Pedaço de conteúdo",
|
||||
"ContentPieces": "Pedaços de conteúdo",
|
||||
"ContentTarget": "Conteúdo-alvo",
|
||||
"ContentTargets": "Conteúdos-alvo",
|
||||
"Contents": "Conteúdos",
|
||||
"InteractionsMetricDocumentation": "O número de interações num bloco de conteúdo (por exemplo, um 'clique' num banner ou publicidade)",
|
||||
"ImpressionsMetricDocumentation": "O número de vezes que um bloco de conteúdo, como um banner ou publicidade, foi apresentado numa página.",
|
||||
"InteractionRateMetricDocumentation": "O rácio de impressões a interações de conteúdo."
|
||||
}
|
||||
}
|
5
msd2/tracking/piwik/plugins/Contents/lang/ro.json
Normal file
5
msd2/tracking/piwik/plugins/Contents/lang/ro.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"Contents": {
|
||||
"ContentName": "Nume Continut"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/ru.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/ru.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Отслеживание контента и баннеров позволяет вам измерять эффективность (просмотры, клики, CTR) любой части контента на ваших страницах (баннер-реклама, изображение, любой элемент).",
|
||||
"Impressions": "Показы",
|
||||
"ContentImpression": "Показы контента",
|
||||
"ContentInteraction": "Взаимодействие с контентом",
|
||||
"ContentInteractions": "Взаимодействия с контентом",
|
||||
"InteractionRate": "Коэффициент взаимодествия",
|
||||
"ContentName": "Название публикации",
|
||||
"ContentNames": "Названия публикаций",
|
||||
"ContentPiece": "Часть публикации",
|
||||
"ContentPieces": "Часть публикаций",
|
||||
"ContentTarget": "Цель публикации",
|
||||
"ContentTargets": "Цели публикаций",
|
||||
"Contents": "Публикации",
|
||||
"InteractionsMetricDocumentation": "Сколько раз с блоком контента происходило взаимодействие (например, 'клик' по баннеру или рекламе).",
|
||||
"ImpressionsMetricDocumentation": "Сколько раз блок контента, такой как баннер или реклама, был показан на странице.",
|
||||
"InteractionRateMetricDocumentation": "Соотношение представления контента и взаимодействий."
|
||||
}
|
||||
}
|
10
msd2/tracking/piwik/plugins/Contents/lang/sl.json
Normal file
10
msd2/tracking/piwik/plugins/Contents/lang/sl.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Ogledi",
|
||||
"InteractionRate": "Stopnja interakcij",
|
||||
"ContentName": "Ime vsebine",
|
||||
"ContentPiece": "Del vsebine",
|
||||
"ContentTarget": "Cilj vsebine",
|
||||
"Contents": "Vsebine"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/sq.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/sq.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Ndjekja e lëndës dhe e banderolave ju lejon të matni punimin (parje, klikime, CTR) të çfarëdo pjese të lëndës në faqet tuaja (banderolë reklame, figurë, çfarëdo objekti).",
|
||||
"Impressions": "Përshtypje",
|
||||
"ContentImpression": "Përshtypje Lënde",
|
||||
"ContentInteraction": "Ndërveprim Me Lëndën",
|
||||
"ContentInteractions": "Ndërveprime me Lëndën",
|
||||
"InteractionRate": "Shkallë Ndërveprimi",
|
||||
"ContentName": "Emër Lënde",
|
||||
"ContentNames": "Emra Lënde",
|
||||
"ContentPiece": "Copëz Lënde",
|
||||
"ContentPieces": "Copëza Lënde",
|
||||
"ContentTarget": "Synim Lënde",
|
||||
"ContentTargets": "Synime Lënde",
|
||||
"Contents": "Lëndë",
|
||||
"InteractionsMetricDocumentation": "Numri i herëve kur për një bllok lënde ka pasur ndërveprime (p.sh., një 'klikim' mbi një banderolë apo reklamë).",
|
||||
"ImpressionsMetricDocumentation": "Numri i herëve që një bllok lënde, i tillë si banderolë apo reklamë, është shfaqur në një faqe.",
|
||||
"InteractionRateMetricDocumentation": "Përpjesëtimi i përshtypjeve nga lënda kundrejt ndërveprimeve."
|
||||
}
|
||||
}
|
16
msd2/tracking/piwik/plugins/Contents/lang/sr.json
Normal file
16
msd2/tracking/piwik/plugins/Contents/lang/sr.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Praćenje sadržaja i banera vam omogućuje merenje performansi (prikaza, klikova, CTR) bilo kog dela sadržaja vaših stranica (reklama, slika itd.).",
|
||||
"Impressions": "Prikazi",
|
||||
"ContentInteraction": "Interakcija sa sadržajem",
|
||||
"ContentInteractions": "Interakcije sa sadržajem",
|
||||
"InteractionRate": "Odnos interakcija",
|
||||
"ContentName": "Naziv sadržaja",
|
||||
"ContentPiece": "Sadržaj",
|
||||
"ContentTarget": "Cilj sadržaja",
|
||||
"Contents": "Sadržaji",
|
||||
"InteractionsMetricDocumentation": "Broj interakcija sa blokom sadržaja (npr., klik na baner ili reklamu).",
|
||||
"ImpressionsMetricDocumentation": "Broj prikaza bloka sadržaja poput banera i reklama na stranici.",
|
||||
"InteractionRateMetricDocumentation": "Odnos prikaza i interakcija sadržaja."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/sv.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/sv.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Innehålls- och bannertracking ger dig möjlighet att mäta prestanda (visningar, klick, CTR) för alla typer av innehåll på dina sidor (bannerannonser, bilder mm).",
|
||||
"Impressions": "Visningar",
|
||||
"ContentImpression": "Innehållsintryck",
|
||||
"ContentInteraction": "Innehållsinteraktion",
|
||||
"ContentInteractions": "Innehållsinteraktioner",
|
||||
"InteractionRate": "Andel interaktioner",
|
||||
"ContentName": "Namn på innehåll",
|
||||
"ContentNames": "Innehållsnamn",
|
||||
"ContentPiece": "Innehållsdel",
|
||||
"ContentPieces": "Innehållsdelar",
|
||||
"ContentTarget": "Innehållsmål",
|
||||
"ContentTargets": "Innehållsmål",
|
||||
"Contents": "Innehåll",
|
||||
"InteractionsMetricDocumentation": "Antalet gånger ett innehållsblock har interagerats med (t.ex. ett \"klick\" på en banner eller annons).",
|
||||
"ImpressionsMetricDocumentation": "Antalet gånger ett innehållsblock såsom en banner eller en annons har visats på en sida.",
|
||||
"InteractionRateMetricDocumentation": "Förhållandet mellan innehållsvisningar och interaktioner."
|
||||
}
|
||||
}
|
10
msd2/tracking/piwik/plugins/Contents/lang/ta.json
Normal file
10
msd2/tracking/piwik/plugins/Contents/lang/ta.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "எண்ண ஓட்டம்",
|
||||
"InteractionRate": "உரையாடல் வீதம்",
|
||||
"ContentName": "உள்ளடக்கத்தின் பெயர்",
|
||||
"ContentPiece": "உள்ளடக்கக் கூறு",
|
||||
"ContentTarget": "உள்ளடக்க இலக்கு",
|
||||
"Contents": "உள்ளடக்கம்"
|
||||
}
|
||||
}
|
10
msd2/tracking/piwik/plugins/Contents/lang/tl.json
Normal file
10
msd2/tracking/piwik/plugins/Contents/lang/tl.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Contents": {
|
||||
"Impressions": "Mga Impresyon",
|
||||
"InteractionRate": "Rate ng Pakikipag-ugnayan",
|
||||
"ContentName": "Pangalan ng Nilalaman",
|
||||
"ContentPiece": "Piraso ng Nilalaman",
|
||||
"ContentTarget": "Target ng Nilalaman",
|
||||
"Contents": "Mga Nilalaman"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/tr.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/tr.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "İçerik ve reklam izleme, sayfalarınızdaki herhangi bir içeriğin (reklam, görsel, herhangi bir öge) başarımının (görülme, tıklanma, CTR) izlenmesini sağlar.",
|
||||
"Impressions": "Görülme",
|
||||
"ContentImpression": "İçerik Gösterimi",
|
||||
"ContentInteraction": "İçerik Etkileşimi",
|
||||
"ContentInteractions": "İçerik Etkileşimleri",
|
||||
"InteractionRate": "Etkileşim Oranı",
|
||||
"ContentName": "İçerik Adı",
|
||||
"ContentNames": "İçerik Adı",
|
||||
"ContentPiece": "İçerik Parçası",
|
||||
"ContentPieces": "İçerik Parçası",
|
||||
"ContentTarget": "İçerik Hedefi",
|
||||
"ContentTargets": "İçerik Hedefi",
|
||||
"Contents": "İçerikler",
|
||||
"InteractionsMetricDocumentation": "İçerik bloğu ile kaç kere etkileşime geçildiği (afiş ya da reklama 'tıklanma' gibi).",
|
||||
"ImpressionsMetricDocumentation": "Afiş ya da reklam gibi bir içerik bloğunun bir sayfada kaç kere görüntülendiği .",
|
||||
"InteractionRateMetricDocumentation": "İçeriğin görüntülenmesi ile etkileşime geçilme oranı."
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/uk.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/uk.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Відстеження контенту і банерів дозволяє вам вимірювати ефективність (перегляди, кліки, CTR) в будь-якій частині контенту на ваших сторінках (рекламний банер, зображення, будь-який елемент).",
|
||||
"Impressions": "Покази",
|
||||
"ContentImpression": "Зміст показу",
|
||||
"ContentInteraction": "Зміст взаємодії",
|
||||
"ContentInteractions": "Зміст взаємодій",
|
||||
"InteractionRate": "Коефіцієнт взаємодії",
|
||||
"ContentName": "Назва публікації",
|
||||
"ContentNames": "Назви публікацій",
|
||||
"ContentPiece": "Частина публікації",
|
||||
"ContentPieces": "Частини публікацій",
|
||||
"ContentTarget": "Ціль публікації",
|
||||
"ContentTargets": "Цілі публікацій",
|
||||
"Contents": "Публікації",
|
||||
"InteractionsMetricDocumentation": "Скільки разів з блоком контенту відбувалося взаємодія (наприклад, 'клік' по банеру або рекламі).",
|
||||
"ImpressionsMetricDocumentation": "Скільки разів блок контенту, такий як банер або реклама, був показаний на сторінці.",
|
||||
"InteractionRateMetricDocumentation": "Співвідношення подання контенту і взаємодій."
|
||||
}
|
||||
}
|
11
msd2/tracking/piwik/plugins/Contents/lang/vi.json
Normal file
11
msd2/tracking/piwik/plugins/Contents/lang/vi.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "Chức năng theo dõi nội dung và banner cho phép bạn đánh giá được hiệu quả (lượt xem, click, CTR) của bất kỳ trang web nào.",
|
||||
"Impressions": "Lượt hiển thị cho người dùng",
|
||||
"InteractionRate": "Tỷ lệ tương tác",
|
||||
"ContentName": "Tên nội dung",
|
||||
"ContentPiece": "Thành phần nội dung",
|
||||
"ContentTarget": "Đối tượng nội dung",
|
||||
"Contents": "Nội dung"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/zh-cn.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/zh-cn.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "追踪内容和横幅可以让您衡量您网页上任何一部分内容(横幅广告,图像,任何项目)的表现(浏览次数,点击次数,点击率)。",
|
||||
"Impressions": "展示次数",
|
||||
"ContentImpression": "内容展示量",
|
||||
"ContentInteraction": "内容互动",
|
||||
"ContentInteractions": "内容互动",
|
||||
"InteractionRate": "互动率",
|
||||
"ContentName": "内容名称",
|
||||
"ContentNames": "内容名称",
|
||||
"ContentPiece": "内容区块",
|
||||
"ContentPieces": "内容片段",
|
||||
"ContentTarget": "内容目标",
|
||||
"ContentTargets": "内容目标",
|
||||
"Contents": "内容",
|
||||
"InteractionsMetricDocumentation": "内容区块的互动次数(例如点击横幅或广告)",
|
||||
"ImpressionsMetricDocumentation": "内容区块(例如横幅或广告)在页面上的展示次数。",
|
||||
"InteractionRateMetricDocumentation": "内容展示和互动的比率。"
|
||||
}
|
||||
}
|
20
msd2/tracking/piwik/plugins/Contents/lang/zh-tw.json
Normal file
20
msd2/tracking/piwik/plugins/Contents/lang/zh-tw.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"Contents": {
|
||||
"PluginDescription": "追蹤內容和橫幅讓你衡量網頁中任何區塊內容(橫幅廣告、圖片、任何項目)的表現(瀏覽數、點擊數、CTR)。",
|
||||
"Impressions": "曝光",
|
||||
"ContentImpression": "內容曝光",
|
||||
"ContentInteraction": "內容互動",
|
||||
"ContentInteractions": "內容互動",
|
||||
"InteractionRate": "互動率",
|
||||
"ContentName": "內容名稱",
|
||||
"ContentNames": "內容名稱",
|
||||
"ContentPiece": "內容區塊",
|
||||
"ContentPieces": "內容區塊",
|
||||
"ContentTarget": "內容目標",
|
||||
"ContentTargets": "內容目標",
|
||||
"Contents": "內容",
|
||||
"InteractionsMetricDocumentation": "內容區塊的互動次數(例如「點擊」橫幅或廣告)。",
|
||||
"ImpressionsMetricDocumentation": "內容區塊(例如橫幅或廣告)的展示次數。",
|
||||
"InteractionRateMetricDocumentation": "內容曝光及互動的比率。"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<li class="content"
|
||||
title="{{ postEvent('Live.renderActionTooltip', action, visitInfo) }}">
|
||||
<div>
|
||||
{% if action.contentInteraction %}
|
||||
<img src='{{ action.iconSVG|default(action.icon) }}' title='{{ 'Contents_ContentInteraction'|translate }}'
|
||||
class="action-list-action-icon content-interaction">
|
||||
{% else %}
|
||||
<img src='{{ action.iconSVG|default(action.icon) }}' title='{{ 'Contents_ContentImpression'|translate }}'
|
||||
class="action-list-action-icon content-impression">
|
||||
{% endif %}
|
||||
{% if action.contentInteraction %}
|
||||
[{{ action.contentInteraction }}]
|
||||
{% endif %}
|
||||
{{ action.contentName }} -
|
||||
{{ action.contentPiece }}
|
||||
</div>
|
||||
</li>
|
@ -0,0 +1,9 @@
|
||||
{% if action.contentName %}
|
||||
|
||||
{{ 'Contents_ContentName'|translate }}: {{ action.contentName }}{% endif %}{% if action.contentPiece %}
|
||||
|
||||
{{ 'Contents_ContentPiece'|translate }}: {{ action.contentPiece }}{% endif %}{% if action.contentTarget %}
|
||||
|
||||
{{ 'Contents_ContentTarget'|translate }}: {{ action.contentTarget }}{% endif %}{% if action.contentInteraction %}
|
||||
|
||||
{{ 'Contents_ContentInteraction'|translate }}: {{ action.contentInteraction }}{% endif %}
|
Reference in New Issue
Block a user