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:
authorThomas Steur <thomas.steur@googlemail.com>2014-09-18 17:34:30 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-18 17:34:30 +0400
commitceb0dfba008bebefa90e71ee1b9547a46e269cff (patch)
tree77e5b7e4c562f0674f69d97d5d72a96b3c903c39 /plugins/Live
parentf328ff521e8ce0e80523f1cb6578fec89227ffe5 (diff)
refs #4996 trying to ignore content impressions in live api, not sure if that works
Diffstat (limited to 'plugins/Live')
-rw-r--r--plugins/Live/Visitor.php35
1 files changed, 31 insertions, 4 deletions
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index d9bb556efd..8f07106d43 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -208,7 +208,7 @@ class Visitor implements VisitorInterface
}
// API.getSuggestedValuesForSegment
- $flatten = array( 'pageTitle', 'siteSearchKeyword', 'eventCategory', 'eventAction', 'eventName', 'eventValue');
+ $flatten = array( 'pageTitle', 'siteSearchKeyword', 'eventCategory', 'eventAction', 'eventName', 'eventValue', 'contentName', 'contentPiece', 'contentTarget', 'contentInteraction');
foreach($flatten as $toFlatten) {
if (!empty($action[$toFlatten])) {
$flattenedKeyName = $toFlatten . ColumnDelete::APPEND_TO_COLUMN_NAME_TO_KEEP . $count;
@@ -265,7 +265,7 @@ class Visitor implements VisitorInterface
// eg. Downloads, Outlinks. For these, idaction_name is set to 0
$sql = "
SELECT
- COALESCE(log_action_event_category.type, log_action.type, log_action_title.type) AS type,
+ COALESCE(log_action_content_interaction.type, log_action_content_name.type, log_action_event_category.type, log_action.type, log_action_title.type) AS type,
log_action.name AS url,
log_action.url_prefix,
log_action_title.name AS pageTitle,
@@ -276,7 +276,10 @@ class Visitor implements VisitorInterface
log_link_visit_action.custom_float
". $sqlCustomVariables . ",
log_action_event_category.name AS eventCategory,
- log_action_event_action.name as eventAction
+ log_action_event_action.name as eventAction,
+ log_action_content_name.name AS contentName,
+ log_action_content_piece.name as contentPiece,
+ log_action_content_interaction.name as contentInteraction
FROM " . Common::prefixTable('log_link_visit_action') . " AS log_link_visit_action
LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action
ON log_link_visit_action.idaction_url = log_action.idaction
@@ -286,6 +289,12 @@ class Visitor implements VisitorInterface
ON log_link_visit_action.idaction_event_category = log_action_event_category.idaction
LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_event_action
ON log_link_visit_action.idaction_event_action = log_action_event_action.idaction
+ LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_content_name
+ ON log_link_visit_action.idaction_content_name = log_action_content_name.idaction
+ LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_content_piece
+ ON log_link_visit_action.idaction_content_piece = log_action_content_piece.idaction
+ LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_content_interaction
+ ON log_link_visit_action.idaction_content_interaction = log_action_content_interaction.idaction
WHERE log_link_visit_action.idvisit = ?
ORDER BY server_time ASC
LIMIT 0, $actionsLimit
@@ -312,7 +321,21 @@ class Visitor implements VisitorInterface
$actionDetail['customVariables'] = $customVariablesPage;
}
- if($actionDetail['type'] == Action::TYPE_EVENT_CATEGORY) {
+ if ($actionDetail['type'] !== Action::TYPE_CONTENT_INTERACTION) {
+ unset($actionDetail['contentName']);
+ unset($actionDetail['contentPiece']);
+ unset($actionDetail['contentInteraction']);
+ }
+
+ if ($actionDetail['type'] == Action::TYPE_CONTENT_INTERACTION) {
+
+ // $actionDetails[$actionIdx];
+
+ } elseif ($actionDetail['type'] == Action::TYPE_CONTENT) {
+
+ unset($actionDetails[$actionIdx]);
+
+ } elseif ($actionDetail['type'] == Action::TYPE_EVENT_CATEGORY) {
// Handle Event
if(strlen($actionDetail['pageTitle']) > 0) {
$actionDetail['eventName'] = $actionDetail['pageTitle'];
@@ -479,6 +502,10 @@ class Visitor implements VisitorInterface
$details['type'] = 'event';
$details['icon'] = 'plugins/Morpheus/images/event.png';
break;
+ case Action::TYPE_CONTENT_INTERACTION:
+ $details['type'] = 'content_interaction';
+ $details['icon'] = '';
+ break;
default:
$details['type'] = 'action';
$details['icon'] = null;