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:
authormattpiwik <matthieu.aubry@gmail.com>2011-04-11 10:15:16 +0400
committermattpiwik <matthieu.aubry@gmail.com>2011-04-11 10:15:16 +0400
commitd079e678ecc5d4e9085ffdd46ec827e9fdf13e40 (patch)
treec579bdd5e4d434260e036ab8548f76cd4e62bc89 /plugins/Live/Visitor.php
parent36de8c586ea04f8bc00ca3beb0bb57df8c96306e (diff)
Fixes #2281
* Now display Clicks, Downloads and Multiple Goal conversions in both Visitor Log and Live! widget * Added goals/all actions in Live! API output, simplifying output. Hopefully now output is final for Piwik Mobile & other apps to re-use (any feedback on this?) * cleaning up colored logos ensuring background is pure white rather than slightly colored git-svn-id: http://dev.piwik.org/svn/trunk@4394 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/Visitor.php')
-rw-r--r--plugins/Live/Visitor.php78
1 files changed, 5 insertions, 73 deletions
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index 06bfadb7f2..75119449d3 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -43,11 +43,14 @@ class Piwik_Live_Visitor
'visitIp' => $this->getIp(),
'visitorId' => $this->getVisitorId(),
'visitorType' => $this->isVisitorReturning() ? 'returning' : 'new',
+ 'visitConverted' => $this->isVisitorGoalConverted(),
- //placeholder to be filled in API
'actions' => $this->getNumberOfActions(),
+ // => false are placeholders to be filled in API later
'actionDetails' => false,
'customVariables' => $this->getCustomVariables(),
+ 'goalConversions' => false,
+ 'siteCurrency' => false,
// all time entries
'serverDate' => $this->getServerDate(),
@@ -87,15 +90,6 @@ class Piwik_Live_Visitor
'screenTypeIcon' => $this->getScreenTypeIcon(),
'plugins' => $this->getPlugins(),
'pluginsIcons' => $this->getPluginIcons(),
-
- // Goals
- 'visitConverted' => $this->isVisitorGoalConverted(),
- 'goalIcon' => $this->getGoalIcon(),
- 'goalType' => $this->getGoalType(),
- 'goalName' => $this->getGoalName(),
- 'goalRevenue' => $this->getGoalRevenue(),
- 'goalConvertedPageId' => $this->getGoalConvertedPageId(),
- 'goalTimePretty' => $this->getGoalTimePretty()
);
}
@@ -209,7 +203,7 @@ class Piwik_Live_Visitor
'customVariableName'.$i => $this->details['custom_var_k'.$i],
'customVariableValue'.$i => $this->details['custom_var_v'.$i],
);
- }
+ }
}
return $customVariables;
}
@@ -389,66 +383,4 @@ class Piwik_Live_Visitor
{
return $this->details['visit_goal_converted'];
}
-
- function getGoalType()
- {
- if(isset($this->details['goal_match_attribute'])){
- return ucfirst($this->details['goal_match_attribute']);
- }
- return false;
- }
-
- function getGoalIcon()
- {
- if(isset($this->details['goal_match_attribute'])){
- $goalicon = '';
- switch ($this->details['goal_match_attribute']) {
- case "file":
- $goalicon = 'plugins/Live/templates/images/download.png';
- break;
- case 'external_website':
- $goalicon = 'plugins/Live/templates/images/outboundlink.png';
- break;
- case 'url':
- case 'manually':
- default:
- $goalicon = 'themes/default/images/goal.png';
- break;
- }
- return $goalicon;
- }
- return false;
- }
-
- function getGoalName()
- {
- if(isset($this->details['goal_name'])){
- return $this->details['goal_name'];
- }
- return false;
- }
-
- function getGoalRevenue()
- {
- if(isset($this->details['goal_revenue'])){
- return $this->details['goal_revenue'];
- }
- return false;
- }
-
- function getGoalConvertedPageId()
- {
- if(isset($this->details['idlink_va'])){
- return $this->details['idlink_va'];
- }
- return false;
- }
-
- function getGoalTimePretty()
- {
- if(isset($this->details['goal_server_time'])){
- return $this->details['goal_server_time'];
- }
- return false;
- }
}