diff --git a/core/Tracker/TableLogAction.php b/core/Tracker/TableLogAction.php index 40acd89f705ce82c3b3efcf8f1cf35964bb28fe1..c547d742b80f87591c7cbaa13dbe3e5c6fb43d85 100644 --- a/core/Tracker/TableLogAction.php +++ b/core/Tracker/TableLogAction.php @@ -235,6 +235,7 @@ class TableLogAction 'contentPiece' => Action::TYPE_CONTENT_PIECE, 'contentTarget' => Action::TYPE_CONTENT_TARGET, 'contentName' => Action::TYPE_CONTENT_NAME, + 'contentInteraction' => Action::TYPE_CONTENT_INTERACTION, ); if(!empty($exactMatch[$segmentName])) { return $exactMatch[$segmentName]; diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index af9a2d64cda83aa233dee4003d58e97926dbbe94..8605e38e1f5a5b41cd6800c834950573566e0d18 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -899,7 +899,7 @@ class PiwikTracker throw new Exception("You must specify a content name"); } - $url .= 'c_n=' . urlencode($contentName); + $url .= '&c_n=' . urlencode($contentName); if (!empty($contentPiece) && strlen($contentPiece) > 0) { $url .= '&c_p=' . urlencode($contentPiece); @@ -934,8 +934,8 @@ class PiwikTracker throw new Exception("You must specify a content name"); } - $url .= 'c_i=' . urlencode($interaction); - $url .= 'c_n=' . urlencode($contentName); + $url .= '&c_i=' . urlencode($interaction); + $url .= '&c_n=' . urlencode($contentName); if (!empty($contentPiece) && strlen($contentPiece) > 0) { $url .= '&c_p=' . urlencode($contentPiece); diff --git a/plugins/Contents/API.php b/plugins/Contents/API.php index 95dc283fe10bfbe99ee96b5be2e030f87abb5f81..002360588f4475c9b55cd13e3773682e02b27ae0 100644 --- a/plugins/Contents/API.php +++ b/plugins/Contents/API.php @@ -13,6 +13,7 @@ use Piwik\DataTable; use Piwik\DataTable\Row; use Piwik\Metrics; use Piwik\Piwik; +use Piwik\Plugins\Contents\Archiver; /** * API for plugin Contents @@ -54,6 +55,11 @@ class API extends \Piwik\Plugin\API 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', ''); + } + } }); // Content interaction rate = interactions / impressions