diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2012-10-07 10:43:22 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2012-10-07 10:43:22 +0400 |
commit | 4d3a3b3204da368e809d374f9471b3bb9af883fd (patch) | |
tree | 6c3830686ee79425a259bc03603399dbd781c126 /plugins/Transitions | |
parent | ac5425ec48878249080de5624f5b235b40059204 (diff) |
Refs #3332
* Transition works for Page titles with hierarchy (eg "$Category / $name")
* URL metadata:
* is only available on non Summary rows.
* It is now set to the page with highest number of visits, when page names do overwrite.
* However now, by default we do track keep hash tags and we do not aggregate them in one page URL.
* Refs #3232 Will be nice to have, to allow to "not track fragment" by default. See stub processUrlFragment().
More to do: Admin UI, Tests w/ and wo/ hash tags, w/ Capital letter in hostname
* URL being tracked, and URL read from the logs (for backward compatibility) are now cleaned: hostname is lowered,
and URL Fragment is kept/removed.
git-svn-id: http://dev.piwik.org/svn/trunk@7113 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Transitions')
-rw-r--r-- | plugins/Transitions/API.php | 7 | ||||
-rw-r--r-- | plugins/Transitions/Transitions.php | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php index bb855bdb4c..c9bd0af82a 100644 --- a/plugins/Transitions/API.php +++ b/plugins/Transitions/API.php @@ -108,14 +108,17 @@ class Piwik_Transitions_API private function deriveIdAction($actionName, $actionType) { $actionsPlugin = new Piwik_Actions; - + $actionName = Piwik_Common::unsanitizeInputValue($actionName); switch ($actionType) { case 'url': - $actionName = Piwik_Common::unsanitizeInputValue($actionName); return $actionsPlugin->getIdActionFromSegment($actionName, 'idaction_url'); case 'title': + // Transitions is called with Page titles separated by > so we transform back + $actionName = explode(Piwik_API_DataTableManipulator_LabelFilter::SEPARATOR_RECURSIVE_LABEL, $actionName); + $actionName = array_map('trim', $actionName ); + $actionName = implode("/", $actionName); $id = $actionsPlugin->getIdActionFromSegment($actionName, 'idaction_name'); if ($id < 0) diff --git a/plugins/Transitions/Transitions.php b/plugins/Transitions/Transitions.php index f51fbd0139..593b67fc7b 100644 --- a/plugins/Transitions/Transitions.php +++ b/plugins/Transitions/Transitions.php @@ -210,7 +210,8 @@ class Piwik_Transitions extends Piwik_Plugin ); } - private function getPageLabel(&$pageRecord, $isTitle) { + private function getPageLabel(&$pageRecord, $isTitle) + { if ($isTitle) { $label = $pageRecord['name']; @@ -330,11 +331,13 @@ class Piwik_Transitions extends Piwik_Plugin * Get the sum of all transitions to following actions (pages, outlinks, downloads). * Only works if queryFollowingActions() has been used directly before. */ - public function getTotalTransitionsToFollowingActions() { + public function getTotalTransitionsToFollowingActions() + { return $this->totalTransitionsToFollowingActions; } - private function getColumnTypeSuffix($actionType) { + private function getColumnTypeSuffix($actionType) + { if ($actionType == 'title') { return 'name'; } |