From 40f886baf0e3ce5bbe4a066b333a7cc24eb93163 Mon Sep 17 00:00:00 2001
From: Stefan Giehl <stefan@piwik.org>
Date: Thu, 14 Sep 2017 23:54:01 +0200
Subject: [PATCH] Makes visitor log/profile independent from Events plugin
 (#12047)

* makes profile query independent from events plugin

* move more stuff to event plugin

* update test files
---
 plugins/Actions/VisitorDetails.php            | 59 +++++-------
 plugins/Events/Events.php                     |  1 +
 plugins/Events/VisitorDetails.php             | 20 +++-
 ...ITest__Live.getLastVisitsDetails_range.xml | 68 +++++++-------
 ...mEvents__Live.getLastVisitsDetails_day.xml | 94 +++++++++----------
 ...vents__Live.getLastVisitsDetails_month.xml | 94 +++++++++----------
 ...tLogs__Live.getLastVisitsDetails_range.xml |  4 +-
 ...iteId__Live.getLastVisitsDetails_range.xml |  2 +-
 ...mit_1__Live.getLastVisitsDetails_month.xml |  8 +-
 ...mit_2__Live.getLastVisitsDetails_month.xml |  4 +-
 ...Visit__Live.getLastVisitsDetails_month.xml | 12 +--
 ...tDesc__Live.getLastVisitsDetails_month.xml | 12 +--
 ...eTest__Live.getLastVisitsDetails_month.xml | 20 ++--
 13 files changed, 202 insertions(+), 196 deletions(-)

diff --git a/plugins/Actions/VisitorDetails.php b/plugins/Actions/VisitorDetails.php
index 7292bd87f5..becb6cdaf7 100644
--- a/plugins/Actions/VisitorDetails.php
+++ b/plugins/Actions/VisitorDetails.php
@@ -22,8 +22,6 @@ use Piwik\View;
 
 class VisitorDetails extends VisitorDetailsAbstract
 {
-    const EVENT_VALUE_PRECISION = 3;
-
     public function extendVisitorDetails(&$visitor)
     {
         $visitor['searches']     = $this->details['visit_total_searches'];
@@ -50,19 +48,11 @@ class VisitorDetails extends VisitorDetailsAbstract
 
         $formatter = new Formatter();
 
-        $actionTypesToHandle = array(
-            Action::TYPE_PAGE_URL,
-            Action::TYPE_SITE_SEARCH,
-            Action::TYPE_EVENT,
-            Action::TYPE_OUTLINK,
-            Action::TYPE_DOWNLOAD
-        );
-
         // Enrich with time spent per action
         $nextActionId = 0;
         foreach ($actionDetails as $idx => &$action) {
 
-            if ($idx < $nextActionId || !in_array($action['type'], $actionTypesToHandle)) {
+            if ($idx < $nextActionId || !$this->shouldHandleAction($action)) {
                 continue; // skip to next action having timeSpentRef
             }
 
@@ -71,7 +61,7 @@ class VisitorDetails extends VisitorDetailsAbstract
             $nextAction   = null;
 
             while (isset($actionDetails[$nextActionId]) &&
-                (!in_array($actionDetails[$nextActionId]['type'], $actionTypesToHandle) ||
+                (!$this->shouldHandleAction($actionDetails[$nextActionId]) ||
                     !array_key_exists('timeSpentRef', $actionDetails[$nextActionId]))) {
                 $nextActionId++;
             }
@@ -107,40 +97,37 @@ class VisitorDetails extends VisitorDetailsAbstract
         $actions = $actionDetails;
     }
 
+    private function shouldHandleAction($action) {
+        $actionTypesToHandle = array(
+            Action::TYPE_PAGE_URL,
+            Action::TYPE_SITE_SEARCH,
+            Action::TYPE_EVENT,
+            Action::TYPE_OUTLINK,
+            Action::TYPE_DOWNLOAD
+        );
+
+        return in_array($action['type'], $actionTypesToHandle) || !empty($action['eventType']);
+    }
+
     public function extendActionDetails(&$action, $nextAction, $visitorDetails)
     {
         $formatter = new Formatter();
 
-        if ($action['type'] == Action::TYPE_EVENT) {
-            // Handle Event
-            if (strlen($action['pageTitle']) > 0) {
-                $action['eventName'] = $action['pageTitle'];
-            }
-
+        if ($action['type'] == Action::TYPE_SITE_SEARCH) {
+            // Handle Site Search
+            $action['siteSearchKeyword'] = $action['pageTitle'];
             unset($action['pageTitle']);
-
-        } else {
-            if ($action['type'] == Action::TYPE_SITE_SEARCH) {
-                // Handle Site Search
-                $action['siteSearchKeyword'] = $action['pageTitle'];
-                unset($action['pageTitle']);
-            }
         }
 
-        // Event value / Generation time
-        if ($action['type'] == Action::TYPE_EVENT) {
-            if (strlen($action['custom_float']) > 0) {
-                $action['eventValue'] = round($action['custom_float'], self::EVENT_VALUE_PRECISION);
-            }
-        } elseif (isset($action['custom_float']) && $action['custom_float'] > 0) {
+        // Generation time
+        if ($this->shouldHandleAction($action) && empty($action['eventType']) && isset($action['custom_float']) && $action['custom_float'] > 0) {
             $action['generationTimeMilliseconds'] = $action['custom_float'];
             $action['generationTime'] = $formatter->getPrettyTimeFromSeconds($action['custom_float'] / 1000, true);
+            unset($action['custom_float']);
         }
-        unset($action['custom_float']);
 
-        if ($action['type'] != Action::TYPE_EVENT) {
-            unset($action['eventCategory']);
-            unset($action['eventAction']);
+        if (array_key_exists('custom_float', $action) && is_null($action['custom_float'])) {
+            unset($action['custom_float']);
         }
 
         if (array_key_exists('interaction_position', $action)) {
@@ -214,7 +201,7 @@ class VisitorDetails extends VisitorDetailsAbstract
         $sql           = "
 				SELECT
 					log_link_visit_action.idvisit,
-					COALESCE(log_action_event_category.type, log_action.type, log_action_title.type) AS type,
+					COALESCE(log_action.type, log_action_title.type) AS type,
 					log_action.name AS url,
 					log_action.url_prefix,
 					log_action_title.name AS pageTitle,
diff --git a/plugins/Events/Events.php b/plugins/Events/Events.php
index eee4ce7f52..d3fc8501f1 100644
--- a/plugins/Events/Events.php
+++ b/plugins/Events/Events.php
@@ -263,6 +263,7 @@ class Events extends \Piwik\Plugin
 
     public function provideActionDimensionFields(&$fields, &$joins)
     {
+        $fields[] = 'log_action_event_category.type AS eventType';
         $fields[] = 'log_action_event_category.name AS eventCategory';
         $fields[] = 'log_action_event_action.name as eventAction';
         $joins[] = 'LEFT JOIN ' . Common::prefixTable('log_action') . ' AS log_action_event_action
diff --git a/plugins/Events/VisitorDetails.php b/plugins/Events/VisitorDetails.php
index 76dfd37806..ecf76847d8 100644
--- a/plugins/Events/VisitorDetails.php
+++ b/plugins/Events/VisitorDetails.php
@@ -6,6 +6,7 @@
  * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
  *
  */
+
 namespace Piwik\Plugins\Events;
 
 use Piwik\Plugins\Live\VisitorDetailsAbstract;
@@ -14,12 +15,29 @@ use Piwik\View;
 
 class VisitorDetails extends VisitorDetailsAbstract
 {
+    const EVENT_VALUE_PRECISION = 3;
+
     public function extendActionDetails(&$action, $nextAction, $visitorDetails)
     {
-        if ($action['type'] == Action::TYPE_EVENT) {
+        if (!empty($action['eventType'])) {
             $action['type'] = 'event';
             $action['icon'] = 'plugins/Morpheus/images/event.png';
+
+            if (strlen($action['pageTitle']) > 0) {
+                $action['eventName'] = $action['pageTitle'];
+            }
+
+            if (isset($action['custom_float']) && strlen($action['custom_float']) > 0) {
+                $action['eventValue'] = round($action['custom_float'], self::EVENT_VALUE_PRECISION);
+            }
+
+            unset($action['pageTitle']);
+            unset($action['custom_float']);
+        } else {
+            unset($action['eventCategory']);
+            unset($action['eventAction']);
         }
+        unset($action['eventType']);
     }
 
     public function extendVisitorDetails(&$visitor)
diff --git a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
index 27cd927334..6a8ce872e0 100644
--- a/tests/PHPUnit/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
+++ b/tests/PHPUnit/System/expected/test_AutoSuggestAPITest__Live.getLastVisitsDetails_range.xml
@@ -234,11 +234,11 @@
 				<eventCategory>Cat8</eventCategory>
 				<eventAction>Action8</eventAction>
 				<bandwidth />
-				<eventName>Name8</eventName>
-				<eventValue>353.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name8</eventName>
+				<eventValue>353.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -574,11 +574,11 @@
 				<eventCategory>Cat7</eventCategory>
 				<eventAction>Action7</eventAction>
 				<bandwidth />
-				<eventName>Name7</eventName>
-				<eventValue>352.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name7</eventName>
+				<eventValue>352.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -936,11 +936,11 @@
 				<eventCategory>Cat6</eventCategory>
 				<eventAction>Action6</eventAction>
 				<bandwidth />
-				<eventName>Name6</eventName>
-				<eventValue>351.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name6</eventName>
+				<eventValue>351.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1276,11 +1276,11 @@
 				<eventCategory>Cat5</eventCategory>
 				<eventAction>Action5</eventAction>
 				<bandwidth />
-				<eventName>Name5</eventName>
-				<eventValue>350.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name5</eventName>
+				<eventValue>350.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1638,11 +1638,11 @@
 				<eventCategory>Cat4</eventCategory>
 				<eventAction>Action4</eventAction>
 				<bandwidth />
-				<eventName>Name4</eventName>
-				<eventValue>349.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name4</eventName>
+				<eventValue>349.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1978,11 +1978,11 @@
 				<eventCategory>Cat3</eventCategory>
 				<eventAction>Action3</eventAction>
 				<bandwidth />
-				<eventName>Name3</eventName>
-				<eventValue>348.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name3</eventName>
+				<eventValue>348.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -2174,11 +2174,11 @@
 				<eventCategory>Cat3</eventCategory>
 				<eventAction>Action3</eventAction>
 				<bandwidth />
-				<eventName>Name3</eventName>
-				<eventValue>348.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name3</eventName>
+				<eventValue>348.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -2672,11 +2672,11 @@
 				<eventCategory>Cat2</eventCategory>
 				<eventAction>Action2</eventAction>
 				<bandwidth />
-				<eventName>Name2</eventName>
-				<eventValue>347.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name2</eventName>
+				<eventValue>347.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -2890,11 +2890,11 @@
 				<eventCategory>Cat2</eventCategory>
 				<eventAction>Action2</eventAction>
 				<bandwidth />
-				<eventName>Name2</eventName>
-				<eventValue>347.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name2</eventName>
+				<eventValue>347.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -3366,11 +3366,11 @@
 				<eventCategory>Cat1</eventCategory>
 				<eventAction>Action1</eventAction>
 				<bandwidth />
-				<eventName>Name1</eventName>
-				<eventValue>346.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name1</eventName>
+				<eventValue>346.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -3562,11 +3562,11 @@
 				<eventCategory>Cat1</eventCategory>
 				<eventAction>Action1</eventAction>
 				<bandwidth />
-				<eventName>Name1</eventName>
-				<eventValue>346.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name1</eventName>
+				<eventValue>346.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -3758,11 +3758,11 @@
 				<eventCategory>Cat1</eventCategory>
 				<eventAction>Action1</eventAction>
 				<bandwidth />
-				<eventName>Name1</eventName>
-				<eventValue>346.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name1</eventName>
+				<eventValue>346.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -3946,11 +3946,11 @@
 				<eventCategory>Cat1</eventCategory>
 				<eventAction>Action1</eventAction>
 				<bandwidth />
-				<eventName>Name1</eventName>
-				<eventValue>346.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name1</eventName>
+				<eventValue>346.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -4740,11 +4740,11 @@
 				<eventCategory>Cat0</eventCategory>
 				<eventAction>Action0</eventAction>
 				<bandwidth />
-				<eventName>Name0</eventName>
-				<eventValue>345.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name0</eventName>
+				<eventValue>345.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -4958,11 +4958,11 @@
 				<eventCategory>Cat0</eventCategory>
 				<eventAction>Action0</eventAction>
 				<bandwidth />
-				<eventName>Name0</eventName>
-				<eventValue>345.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name0</eventName>
+				<eventValue>345.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -5176,11 +5176,11 @@
 				<eventCategory>Cat0</eventCategory>
 				<eventAction>Action0</eventAction>
 				<bandwidth />
-				<eventName>Name0</eventName>
-				<eventValue>345.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name0</eventName>
+				<eventValue>345.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -5386,11 +5386,11 @@
 				<eventCategory>Cat0</eventCategory>
 				<eventAction>Action0</eventAction>
 				<bandwidth />
-				<eventName>Name0</eventName>
-				<eventValue>345.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name0</eventName>
+				<eventValue>345.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml b/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml
index 752d66ceb8..10aac9415c 100644
--- a/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml
+++ b/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_day.xml
@@ -258,10 +258,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -276,10 +276,10 @@
 				<bandwidth />
 				<timeSpent>420</timeSpent>
 				<timeSpentPretty>7 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -294,10 +294,10 @@
 				<bandwidth />
 				<timeSpent>900</timeSpent>
 				<timeSpentPretty>15 min 0s</timeSpentPretty>
-				<eventName>Search query here</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Search query here</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -312,10 +312,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -330,11 +330,11 @@
 				<bandwidth />
 				<timeSpent>720</timeSpent>
 				<timeSpentPretty>12 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -347,11 +347,11 @@
 				<eventCategory>event category Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventCategory>
 				<eventAction>event action Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventAction>
 				<bandwidth />
-				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -620,10 +620,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -644,10 +644,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -668,10 +668,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -692,10 +692,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -716,10 +716,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -740,11 +740,11 @@
 				<bandwidth />
 				<timeSpent>1</timeSpent>
 				<timeSpentPretty>1s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>9</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>9</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -765,11 +765,11 @@
 				<bandwidth />
 				<timeSpent>0</timeSpent>
 				<timeSpentPretty>0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>10</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>10</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -802,8 +802,8 @@
 				<timeSpent>1499</timeSpent>
 				<timeSpentPretty>24 min 59s</timeSpentPretty>
 				<interactionPosition />
-				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -836,10 +836,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -854,10 +854,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -872,10 +872,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -890,10 +890,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -908,10 +908,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -924,10 +924,10 @@
 				<eventCategory>Movie</eventCategory>
 				<eventAction>play25%</eventAction>
 				<bandwidth />
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1279,10 +1279,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1297,10 +1297,10 @@
 				<bandwidth />
 				<timeSpent>420</timeSpent>
 				<timeSpentPretty>7 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1315,10 +1315,10 @@
 				<bandwidth />
 				<timeSpent>900</timeSpent>
 				<timeSpentPretty>15 min 0s</timeSpentPretty>
-				<eventName>Search query here</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Search query here</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1333,10 +1333,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1351,11 +1351,11 @@
 				<bandwidth />
 				<timeSpent>720</timeSpent>
 				<timeSpentPretty>12 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1368,11 +1368,11 @@
 				<eventCategory>event category Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventCategory>
 				<eventAction>event action Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventAction>
 				<bandwidth />
-				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1604,10 +1604,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1628,10 +1628,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1652,10 +1652,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1676,10 +1676,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1700,10 +1700,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1724,11 +1724,11 @@
 				<bandwidth />
 				<timeSpent>1</timeSpent>
 				<timeSpentPretty>1s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>9</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>9</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1749,11 +1749,11 @@
 				<bandwidth />
 				<timeSpent>1499</timeSpent>
 				<timeSpentPretty>24 min 59s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>10</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>10</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1792,10 +1792,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1810,10 +1810,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1828,10 +1828,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1846,10 +1846,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1864,10 +1864,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1880,10 +1880,10 @@
 				<eventCategory>Movie</eventCategory>
 				<eventAction>play25%</eventAction>
 				<bandwidth />
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml
index 2852bfd6bf..eda32c0417 100644
--- a/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_CustomEvents__Live.getLastVisitsDetails_month.xml
@@ -250,10 +250,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -268,10 +268,10 @@
 				<bandwidth />
 				<timeSpent>420</timeSpent>
 				<timeSpentPretty>7 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -286,10 +286,10 @@
 				<bandwidth />
 				<timeSpent>900</timeSpent>
 				<timeSpentPretty>15 min 0s</timeSpentPretty>
-				<eventName>Search query here</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Search query here</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -304,10 +304,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -322,11 +322,11 @@
 				<bandwidth />
 				<timeSpent>720</timeSpent>
 				<timeSpentPretty>12 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -339,11 +339,11 @@
 				<eventCategory>event category Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventCategory>
 				<eventAction>event action Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventAction>
 				<bandwidth />
-				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -575,10 +575,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -599,10 +599,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -623,10 +623,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -647,10 +647,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -671,10 +671,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -695,11 +695,11 @@
 				<bandwidth />
 				<timeSpent>1</timeSpent>
 				<timeSpentPretty>1s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>9</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>9</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -720,11 +720,11 @@
 				<bandwidth />
 				<timeSpent>1499</timeSpent>
 				<timeSpentPretty>24 min 59s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>10</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>10</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -763,10 +763,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -781,10 +781,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -799,10 +799,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -817,10 +817,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -835,10 +835,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -851,10 +851,10 @@
 				<eventCategory>Movie</eventCategory>
 				<eventAction>play25%</eventAction>
 				<bandwidth />
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1210,10 +1210,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1228,10 +1228,10 @@
 				<bandwidth />
 				<timeSpent>420</timeSpent>
 				<timeSpentPretty>7 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1246,10 +1246,10 @@
 				<bandwidth />
 				<timeSpent>900</timeSpent>
 				<timeSpentPretty>15 min 0s</timeSpentPretty>
-				<eventName>Search query here</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Search query here</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1264,10 +1264,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1282,11 +1282,11 @@
 				<bandwidth />
 				<timeSpent>720</timeSpent>
 				<timeSpentPretty>12 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1299,11 +1299,11 @@
 				<eventCategory>event category Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventCategory>
 				<eventAction>event action Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventAction>
 				<bandwidth />
-				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
-				<eventValue>9.66</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>event name Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long Extremely long ---&gt; SHOULD APPEAR IN TEST OUTPUT NOT TRUNCATED &lt;---</eventName>
+				<eventValue>9.66</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1572,10 +1572,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1596,10 +1596,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1620,10 +1620,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1644,10 +1644,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1668,10 +1668,10 @@
 				<bandwidth />
 				<timeSpent>30</timeSpent>
 				<timeSpentPretty>30s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1692,11 +1692,11 @@
 				<bandwidth />
 				<timeSpent>1</timeSpent>
 				<timeSpentPretty>1s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>9</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>9</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1717,11 +1717,11 @@
 				<bandwidth />
 				<timeSpent>0</timeSpent>
 				<timeSpentPretty>0s</timeSpentPretty>
-				<eventName>La fiancée de l'eau</eventName>
-				<eventValue>10</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>La fiancée de l'eau</eventName>
+				<eventValue>10</eventValue>
 				<customVariables>
 					<row>
 						<customVariablePageName1>Page Scope Custom var</customVariablePageName1>
@@ -1754,8 +1754,8 @@
 				<timeSpent>1499</timeSpent>
 				<timeSpentPretty>24 min 59s</timeSpentPretty>
 				<interactionPosition />
-				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1788,10 +1788,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Princess Mononoke (もののけ姫)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1806,10 +1806,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Ponyo (崖の上のポニョ)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1824,10 +1824,10 @@
 				<bandwidth />
 				<timeSpent>60</timeSpent>
 				<timeSpentPretty>1 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1842,10 +1842,10 @@
 				<bandwidth />
 				<timeSpent>120</timeSpent>
 				<timeSpentPretty>2 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1860,10 +1860,10 @@
 				<bandwidth />
 				<timeSpent>1320</timeSpent>
 				<timeSpentPretty>22 min 0s</timeSpentPretty>
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 			<row>
@@ -1876,10 +1876,10 @@
 				<eventCategory>Movie</eventCategory>
 				<eventAction>play25%</eventAction>
 				<bandwidth />
-				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Spirited Away (千と千尋の神隠し)</eventName>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml
index 4ad17456d4..669e84156b 100644
--- a/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml
+++ b/tests/PHPUnit/System/expected/test_ImportLogs__Live.getLastVisitsDetails_range.xml
@@ -3668,10 +3668,10 @@
 				<eventCategory>cloudfront_rtmp</eventCategory>
 				<eventAction>play</eventAction>
 				<bandwidth>3914</bandwidth>
-				<eventName>myvideo</eventName>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>myvideo</eventName>
 				<customVariables>
 					<row>
 						<customVariablePageName1>HTTP-code</customVariablePageName1>
@@ -7045,4 +7045,4 @@
 		<plugins />
 		<pluginsIcons />
 	</row>
-</result>
+</result>
\ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml b/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
index 5b2ac07565..b2aeea41a4 100644
--- a/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
+++ b/tests/PHPUnit/System/expected/test_ImportLogs_siteIdThree_TrackedUsingLogReplayWithFixedSiteId__Live.getLastVisitsDetails_range.xml
@@ -2124,4 +2124,4 @@
 			</row>
 		</pluginsIcons>
 	</row>
-</result>
+</result>
\ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_1__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_1__Live.getLastVisitsDetails_month.xml
index 3b4cd8befe..1b4a9e1d57 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_1__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_1__Live.getLastVisitsDetails_month.xml
@@ -108,11 +108,11 @@
 				<eventCategory>Cat8</eventCategory>
 				<eventAction>Action8</eventAction>
 				<bandwidth />
-				<eventName>Name8</eventName>
-				<eventValue>353.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name8</eventName>
+				<eventValue>353.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -448,11 +448,11 @@
 				<eventCategory>Cat7</eventCategory>
 				<eventAction>Action7</eventAction>
 				<bandwidth />
-				<eventName>Name7</eventName>
-				<eventValue>352.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name7</eventName>
+				<eventValue>352.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_2__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_2__Live.getLastVisitsDetails_month.xml
index 92114fca3c..392b2a5b61 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_2__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_offsetAndLimit_2__Live.getLastVisitsDetails_month.xml
@@ -252,11 +252,11 @@
 				<eventCategory>Cat6</eventCategory>
 				<eventAction>Action6</eventAction>
 				<bandwidth />
-				<eventName>Name6</eventName>
-				<eventValue>351.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name6</eventName>
+				<eventValue>351.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortByIdVisit__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortByIdVisit__Live.getLastVisitsDetails_month.xml
index 706b759468..d5a74b37a4 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortByIdVisit__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortByIdVisit__Live.getLastVisitsDetails_month.xml
@@ -234,11 +234,11 @@
 				<eventCategory>Cat8</eventCategory>
 				<eventAction>Action8</eventAction>
 				<bandwidth />
-				<eventName>Name8</eventName>
-				<eventValue>353.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name8</eventName>
+				<eventValue>353.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -574,11 +574,11 @@
 				<eventCategory>Cat7</eventCategory>
 				<eventAction>Action7</eventAction>
 				<bandwidth />
-				<eventName>Name7</eventName>
-				<eventValue>352.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name7</eventName>
+				<eventValue>352.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -936,11 +936,11 @@
 				<eventCategory>Cat6</eventCategory>
 				<eventAction>Action6</eventAction>
 				<bandwidth />
-				<eventName>Name6</eventName>
-				<eventValue>351.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name6</eventName>
+				<eventValue>351.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortDesc__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortDesc__Live.getLastVisitsDetails_month.xml
index 706b759468..d5a74b37a4 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortDesc__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_Live.getLastVisitsDetails_sortDesc__Live.getLastVisitsDetails_month.xml
@@ -234,11 +234,11 @@
 				<eventCategory>Cat8</eventCategory>
 				<eventAction>Action8</eventAction>
 				<bandwidth />
-				<eventName>Name8</eventName>
-				<eventValue>353.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name8</eventName>
+				<eventValue>353.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -574,11 +574,11 @@
 				<eventCategory>Cat7</eventCategory>
 				<eventAction>Action7</eventAction>
 				<bandwidth />
-				<eventName>Name7</eventName>
-				<eventValue>352.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name7</eventName>
+				<eventValue>352.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -936,11 +936,11 @@
 				<eventCategory>Cat6</eventCategory>
 				<eventAction>Action6</eventAction>
 				<bandwidth />
-				<eventName>Name6</eventName>
-				<eventValue>351.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name6</eventName>
+				<eventValue>351.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
diff --git a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest__Live.getLastVisitsDetails_month.xml
index 03a2f431a7..bf8fcc7b87 100644
--- a/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest__Live.getLastVisitsDetails_month.xml
@@ -234,11 +234,11 @@
 				<eventCategory>Cat8</eventCategory>
 				<eventAction>Action8</eventAction>
 				<bandwidth />
-				<eventName>Name8</eventName>
-				<eventValue>353.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name8</eventName>
+				<eventValue>353.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -574,11 +574,11 @@
 				<eventCategory>Cat7</eventCategory>
 				<eventAction>Action7</eventAction>
 				<bandwidth />
-				<eventName>Name7</eventName>
-				<eventValue>352.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name7</eventName>
+				<eventValue>352.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -936,11 +936,11 @@
 				<eventCategory>Cat6</eventCategory>
 				<eventAction>Action6</eventAction>
 				<bandwidth />
-				<eventName>Name6</eventName>
-				<eventValue>351.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name6</eventName>
+				<eventValue>351.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1276,11 +1276,11 @@
 				<eventCategory>Cat5</eventCategory>
 				<eventAction>Action5</eventAction>
 				<bandwidth />
-				<eventName>Name5</eventName>
-				<eventValue>350.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name5</eventName>
+				<eventValue>350.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
@@ -1638,11 +1638,11 @@
 				<eventCategory>Cat4</eventCategory>
 				<eventAction>Action4</eventAction>
 				<bandwidth />
-				<eventName>Name4</eventName>
-				<eventValue>349.678</eventValue>
 				<interactionPosition />
 				
 				<icon>plugins/Morpheus/images/event.png</icon>
+				<eventName>Name4</eventName>
+				<eventValue>349.678</eventValue>
 				<bandwidth_pretty>0 M</bandwidth_pretty>
 			</row>
 		</actionDetails>
-- 
GitLab