Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Contents/Archiver.php')
-rw-r--r--plugins/Contents/Archiver.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/Contents/Archiver.php b/plugins/Contents/Archiver.php
index c5888b29a8..debac613a9 100644
--- a/plugins/Contents/Archiver.php
+++ b/plugins/Contents/Archiver.php
@@ -21,6 +21,7 @@ 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[]
@@ -248,6 +249,12 @@ class Archiver extends \Piwik\Plugin\Archiver
$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);