diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-04 05:14:01 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-04 05:14:01 +0400 |
commit | b3491bf680740b96fe6b7204864703b64bf19803 (patch) | |
tree | 00f39d47307a63c465554be341eb9ab3d9b9213d /core/Tracker/TableLogAction.php | |
parent | d16c46fa55ff72a61311a89a3a487535d79e0fae (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.php | 11 |
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."); } } |