Skip to content
Extraits de code Groupes Projets
Valider 553bf991 rédigé par Matthieu Aubry's avatar Matthieu Aubry
Parcourir les fichiers

Merge pull request #6889 from piwik/5808

Fix views and events that have the same timestamp get disordered
parents e9fdfd09 227a99d7
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -48,6 +48,7 @@ class Model ...@@ -48,6 +48,7 @@ class Model
log_action.url_prefix, log_action.url_prefix,
log_action_title.name AS pageTitle, log_action_title.name AS pageTitle,
log_action.idaction AS pageIdAction, log_action.idaction AS pageIdAction,
log_link_visit_action.idlink_va,
log_link_visit_action.server_time as serverTimePretty, log_link_visit_action.server_time as serverTimePretty,
log_link_visit_action.time_spent_ref_action as timeSpentRef, log_link_visit_action.time_spent_ref_action as timeSpentRef,
log_link_visit_action.idlink_va AS pageId, log_link_visit_action.idlink_va AS pageId,
...@@ -86,6 +87,7 @@ class Model ...@@ -86,6 +87,7 @@ class Model
goal.name as goalName, goal.name as goalName,
goal.idgoal as goalId, goal.idgoal as goalId,
goal.revenue as revenue, goal.revenue as revenue,
log_conversion.idlink_va,
log_conversion.idlink_va as goalPageId, log_conversion.idlink_va as goalPageId,
log_conversion.server_time as serverTimePretty, log_conversion.server_time as serverTimePretty,
log_conversion.url as url log_conversion.url as url
...@@ -123,7 +125,8 @@ class Model ...@@ -123,7 +125,8 @@ class Model
" . LogAggregator::getSqlRevenue('revenue_shipping') . " as revenueShipping, " . LogAggregator::getSqlRevenue('revenue_shipping') . " as revenueShipping,
" . LogAggregator::getSqlRevenue('revenue_discount') . " as revenueDiscount, " . LogAggregator::getSqlRevenue('revenue_discount') . " as revenueDiscount,
items as items, items as items,
log_conversion.server_time as serverTimePretty log_conversion.server_time as serverTimePretty,
log_conversion.idlink_va
FROM " . Common::prefixTable('log_conversion') . " AS log_conversion FROM " . Common::prefixTable('log_conversion') . " AS log_conversion
WHERE idvisit = ? WHERE idvisit = ?
AND idgoal <= " . GoalManager::IDGOAL_ORDER . " AND idgoal <= " . GoalManager::IDGOAL_ORDER . "
......
...@@ -360,6 +360,10 @@ class Visitor implements VisitorInterface ...@@ -360,6 +360,10 @@ class Visitor implements VisitorInterface
usort($actions, array('static', 'sortByServerTime')); usort($actions, array('static', 'sortByServerTime'));
foreach ($actions as &$action) {
unset($action['idlink_va']);
}
$visitorDetailsArray['actionDetails'] = $actions; $visitorDetailsArray['actionDetails'] = $actions;
foreach ($visitorDetailsArray['actionDetails'] as &$details) { foreach ($visitorDetailsArray['actionDetails'] as &$details) {
switch ($details['type']) { switch ($details['type']) {
...@@ -415,10 +419,19 @@ class Visitor implements VisitorInterface ...@@ -415,10 +419,19 @@ class Visitor implements VisitorInterface
{ {
$ta = strtotime($a['serverTimePretty']); $ta = strtotime($a['serverTimePretty']);
$tb = strtotime($b['serverTimePretty']); $tb = strtotime($b['serverTimePretty']);
return $ta < $tb
? -1 if ($ta < $tb) {
: ($ta == $tb return -1;
? 0 }
: 1);
if ($ta == $tb) {
if ($a['idlink_va'] > $b['idlink_va']) {
return 1;
}
return -1;
}
return 1;
} }
} }
...@@ -1528,34 +1528,34 @@ ...@@ -1528,34 +1528,34 @@
<visitIp>175.41.192.40</visitIp> <visitIp>175.41.192.40</visitIp>
<actionDetails> <actionDetails>
<row>
<type>goal</type>
<goalName>all</goalName>
<goalId>1</goalId>
<revenue>5</revenue>
<goalPageId>48</goalPageId>
<url>http://piwik.net/blog/category/meta/</url>
<icon>plugins/Morpheus/images/goal.png</icon>
</row>
<row> <row>
<type>action</type> <type>action</type>
<url>http://piwik.net/blog/category/meta/</url> <url>http://piwik.net/blog/category/meta/</url>
<pageTitle /> <pageTitle />
<pageIdAction>1</pageIdAction> <pageIdAction>1</pageIdAction>
<pageId>56</pageId> <pageId>48</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.02s</generationTime> <generationTime>0.12s</generationTime>
<timeSpent>52</timeSpent> <timeSpent>0</timeSpent>
<timeSpentPretty>52s</timeSpentPretty> <timeSpentPretty>0s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row>
<type>goal</type>
<goalName>all</goalName>
<goalId>1</goalId>
<revenue>5</revenue>
<goalPageId>48</goalPageId>
<url>http://piwik.net/blog/category/meta/</url>
<icon>plugins/Morpheus/images/goal.png</icon>
</row>
<row> <row>
<type>action</type> <type>action</type>
<url>http://piwik.net/blog/category/meta/</url> <url>http://piwik.net/blog/category/meta/</url>
...@@ -1580,16 +1580,16 @@ ...@@ -1580,16 +1580,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>1</pageIdAction> <pageIdAction>1</pageIdAction>
<pageId>48</pageId> <pageId>56</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.12s</generationTime> <generationTime>0.02s</generationTime>
<timeSpent>0</timeSpent> <timeSpent>52</timeSpent>
<timeSpentPretty>0s</timeSpentPretty> <timeSpentPretty>52s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1598,16 +1598,16 @@ ...@@ -1598,16 +1598,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>2</pageIdAction> <pageIdAction>2</pageIdAction>
<pageId>57</pageId> <pageId>49</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.24s</generationTime> <generationTime>0.23s</generationTime>
<timeSpent>26</timeSpent> <timeSpent>52</timeSpent>
<timeSpentPretty>26s</timeSpentPretty> <timeSpentPretty>52s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1616,14 +1616,14 @@ ...@@ -1616,14 +1616,14 @@
<pageTitle /> <pageTitle />
<pageIdAction>2</pageIdAction> <pageIdAction>2</pageIdAction>
<pageId>49</pageId> <pageId>53</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.23s</generationTime> <generationTime>0.29s</generationTime>
<timeSpent>52</timeSpent> <timeSpent>52</timeSpent>
<timeSpentPretty>52s</timeSpentPretty> <timeSpentPretty>52s</timeSpentPretty>
<icon /> <icon />
...@@ -1634,16 +1634,16 @@ ...@@ -1634,16 +1634,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>2</pageIdAction> <pageIdAction>2</pageIdAction>
<pageId>53</pageId> <pageId>57</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.29s</generationTime> <generationTime>0.24s</generationTime>
<timeSpent>52</timeSpent> <timeSpent>26</timeSpent>
<timeSpentPretty>52s</timeSpentPretty> <timeSpentPretty>26s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1652,16 +1652,16 @@ ...@@ -1652,16 +1652,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>3</pageIdAction> <pageIdAction>3</pageIdAction>
<pageId>54</pageId> <pageId>50</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.62s</generationTime> <generationTime>1.32s</generationTime>
<timeSpent>7</timeSpent> <timeSpent>26</timeSpent>
<timeSpentPretty>7s</timeSpentPretty> <timeSpentPretty>26s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1670,16 +1670,16 @@ ...@@ -1670,16 +1670,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>3</pageIdAction> <pageIdAction>3</pageIdAction>
<pageId>50</pageId> <pageId>54</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>1.32s</generationTime> <generationTime>0.62s</generationTime>
<timeSpent>26</timeSpent> <timeSpent>7</timeSpent>
<timeSpentPretty>26s</timeSpentPretty> <timeSpentPretty>7s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1688,14 +1688,16 @@ ...@@ -1688,14 +1688,16 @@
<pageTitle /> <pageTitle />
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>55</pageId> <pageId>51</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.34s</generationTime> <generationTime>0.54s</generationTime>
<timeSpent>7</timeSpent>
<timeSpentPretty>7s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
...@@ -1704,16 +1706,14 @@ ...@@ -1704,16 +1706,14 @@
<pageTitle /> <pageTitle />
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>51</pageId> <pageId>55</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>HTTP-code</customVariablePageName1> <customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1> <customVariablePageValue1>200</customVariablePageValue1>
</row> </row>
</customVariables> </customVariables>
<generationTime>0.54s</generationTime> <generationTime>0.34s</generationTime>
<timeSpent>7</timeSpent>
<timeSpentPretty>7s</timeSpentPretty>
<icon /> <icon />
</row> </row>
</actionDetails> </actionDetails>
...@@ -2118,6 +2118,24 @@ ...@@ -2118,6 +2118,24 @@
<visitIp>70.95.0.0</visitIp> <visitIp>70.95.0.0</visitIp>
<actionDetails> <actionDetails>
<row>
<type>action</type>
<url>http://piwik.net/Products/theProduct</url>
<pageTitle />
<pageIdAction>55</pageIdAction>
<pageId>58</pageId>
<customVariables>
<row>
<customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1>
</row>
</customVariables>
<generationTime>0.11s</generationTime>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon />
</row>
<row> <row>
<type>goal</type> <type>goal</type>
<goalName>all</goalName> <goalName>all</goalName>
...@@ -2143,24 +2161,6 @@ ...@@ -2143,24 +2161,6 @@
</customVariables> </customVariables>
<icon /> <icon />
</row> </row>
<row>
<type>action</type>
<url>http://piwik.net/Products/theProduct</url>
<pageTitle />
<pageIdAction>55</pageIdAction>
<pageId>58</pageId>
<customVariables>
<row>
<customVariablePageName1>HTTP-code</customVariablePageName1>
<customVariablePageValue1>200</customVariablePageValue1>
</row>
</customVariables>
<generationTime>0.11s</generationTime>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon />
</row>
</actionDetails> </actionDetails>
<goalConversions>1</goalConversions> <goalConversions>1</goalConversions>
<siteCurrency>USD</siteCurrency> <siteCurrency>USD</siteCurrency>
......
...@@ -256,45 +256,45 @@ ...@@ -256,45 +256,45 @@
<row> <row>
<type>action</type> <type>action</type>
<url>http://example.org/user/profile</url> <url>http://example.org/user/profile</url>
<pageTitle>Profile page for user *_)%</pageTitle> <pageTitle>Profile page</pageTitle>
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>3</pageId> <pageId>2</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>Language</customVariablePageName1> <customVariablePageName4>Status user</customVariablePageName4>
<customVariablePageValue1>FR</customVariablePageValue1> <customVariablePageValue4>Loggedin</customVariablePageValue4>
</row>
<row>
<customVariablePageName2>SET WITH EMPTY VALUE PAGE SCOPE</customVariablePageName2>
<customVariablePageValue2 />
</row> </row>
<row> <row>
<customVariablePageName4>Status user</customVariablePageName4> <customVariablePageName5>Status user</customVariablePageName5>
<customVariablePageValue4>looking at &quot;profile page&quot;</customVariablePageValue4> <customVariablePageValue5>looking at &quot;profile page&quot;</customVariablePageValue5>
</row> </row>
</customVariables> </customVariables>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
<type>action</type> <type>action</type>
<url>http://example.org/user/profile</url> <url>http://example.org/user/profile</url>
<pageTitle>Profile page</pageTitle> <pageTitle>Profile page for user *_)%</pageTitle>
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>2</pageId> <pageId>3</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName4>Status user</customVariablePageName4> <customVariablePageName1>Language</customVariablePageName1>
<customVariablePageValue4>Loggedin</customVariablePageValue4> <customVariablePageValue1>FR</customVariablePageValue1>
</row> </row>
<row> <row>
<customVariablePageName5>Status user</customVariablePageName5> <customVariablePageName2>SET WITH EMPTY VALUE PAGE SCOPE</customVariablePageName2>
<customVariablePageValue5>looking at &quot;profile page&quot;</customVariablePageValue5> <customVariablePageValue2 />
</row>
<row>
<customVariablePageName4>Status user</customVariablePageName4>
<customVariablePageValue4>looking at &quot;profile page&quot;</customVariablePageValue4>
</row> </row>
</customVariables> </customVariables>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon /> <icon />
</row> </row>
</actionDetails> </actionDetails>
......
...@@ -256,45 +256,45 @@ ...@@ -256,45 +256,45 @@
<row> <row>
<type>action</type> <type>action</type>
<url>http://example.org/user/profile</url> <url>http://example.org/user/profile</url>
<pageTitle>Profile page for user *_)%</pageTitle> <pageTitle>Profile page</pageTitle>
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>3</pageId> <pageId>2</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName1>Language</customVariablePageName1> <customVariablePageName4>Status user</customVariablePageName4>
<customVariablePageValue1>FR</customVariablePageValue1> <customVariablePageValue4>Loggedin</customVariablePageValue4>
</row>
<row>
<customVariablePageName2>SET WITH EMPTY VALUE PAGE SCOPE</customVariablePageName2>
<customVariablePageValue2 />
</row> </row>
<row> <row>
<customVariablePageName4>Status user</customVariablePageName4> <customVariablePageName5>Status user</customVariablePageName5>
<customVariablePageValue4>looking at &quot;profile page&quot;</customVariablePageValue4> <customVariablePageValue5>looking at &quot;profile page&quot;</customVariablePageValue5>
</row> </row>
</customVariables> </customVariables>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon /> <icon />
</row> </row>
<row> <row>
<type>action</type> <type>action</type>
<url>http://example.org/user/profile</url> <url>http://example.org/user/profile</url>
<pageTitle>Profile page</pageTitle> <pageTitle>Profile page for user *_)%</pageTitle>
<pageIdAction>4</pageIdAction> <pageIdAction>4</pageIdAction>
<pageId>2</pageId> <pageId>3</pageId>
<customVariables> <customVariables>
<row> <row>
<customVariablePageName4>Status user</customVariablePageName4> <customVariablePageName1>Language</customVariablePageName1>
<customVariablePageValue4>Loggedin</customVariablePageValue4> <customVariablePageValue1>FR</customVariablePageValue1>
</row> </row>
<row> <row>
<customVariablePageName5>Status user</customVariablePageName5> <customVariablePageName2>SET WITH EMPTY VALUE PAGE SCOPE</customVariablePageName2>
<customVariablePageValue5>looking at &quot;profile page&quot;</customVariablePageValue5> <customVariablePageValue2 />
</row>
<row>
<customVariablePageName4>Status user</customVariablePageName4>
<customVariablePageValue4>looking at &quot;profile page&quot;</customVariablePageValue4>
</row> </row>
</customVariables> </customVariables>
<timeSpent>0</timeSpent>
<timeSpentPretty>0s</timeSpentPretty>
<icon /> <icon />
</row> </row>
</actionDetails> </actionDetails>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter