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:
authormattab <matthieu.aubry@gmail.com>2013-11-04 05:14:01 +0400
committermattab <matthieu.aubry@gmail.com>2013-11-04 05:14:01 +0400
commitb3491bf680740b96fe6b7204864703b64bf19803 (patch)
tree00f39d47307a63c465554be341eb9ab3d9b9213d /core/Tracker/TableLogAction.php
parentd16c46fa55ff72a61311a89a3a487535d79e0fae (diff)
Refs #472 adding Events segments: eventCategory and eventAction and eventName and eventValue segments and some tests
Diffstat (limited to 'core/Tracker/TableLogAction.php')
-rw-r--r--core/Tracker/TableLogAction.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Tracker/TableLogAction.php b/core/Tracker/TableLogAction.php
index b7ec978876..25deaad0cd 100644
--- a/core/Tracker/TableLogAction.php
+++ b/core/Tracker/TableLogAction.php
@@ -233,6 +233,15 @@ class TableLogAction
*/
private static function guessActionTypeFromSegment($segmentName)
{
+ $exactMatch = array(
+ 'eventAction' => Action::TYPE_EVENT_ACTION,
+ 'eventCategory' => Action::TYPE_EVENT_CATEGORY,
+ 'eventName' => Action::TYPE_EVENT_NAME,
+ );
+ if(!empty($exactMatch[$segmentName])) {
+ return $exactMatch[$segmentName];
+ }
+
if (stripos($segmentName, 'pageurl') !== false) {
$actionType = Action::TYPE_PAGE_URL;
return $actionType;
@@ -243,7 +252,7 @@ class TableLogAction
$actionType = Action::TYPE_SITE_SEARCH;
return $actionType;
} else {
- throw new \Exception(" The segment $segmentName has an unexpected value.");
+ throw new \Exception("We cannot guess the action type from the segment $segmentName.");
}
}