Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Oct 22, 2013
1 parent 3d729ef commit e5db16a
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 110 deletions.
6 changes: 4 additions & 2 deletions core/Tracker/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,20 +291,22 @@ public function record($idVisit, $visitorIdCookie, $idReferrerActionUrl, $idRefe
'time_spent_ref_action' => $timeSpentReferrerAction
);

foreach($this->actionIdsCached as $field => $idAction) {
$insert[$field] = $idAction;
}

$customValue = $this->getCustomFloatValue();
if (!empty($customValue)) {
$insert[self::DB_COLUMN_CUSTOM_FLOAT] = $customValue;
}

$customVariables = $this->getCustomVariables();

if (!empty($customVariables)) {
Common::printDebug("Page level Custom Variables: ");
Common::printDebug($customVariables);
}

$insert = array_merge($insert, $customVariables);

$fields = implode(", ", array_keys($insert));
$bind = array_values($insert);
$values = Common::getSqlStringFieldsArray($insert);
Expand Down
1 change: 1 addition & 0 deletions piwik.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/TableLogAction.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Action.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionClickUrl.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionEvent.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionPageview.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/ActionSiteSearch.php';
require_once PIWIK_INCLUDE_PATH . '/core/Tracker/Request.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
<result prettyDate="Sunday 3 January 2010">
<row>
<label>/movies</label>
<nb_visits>4</nb_visits>
<nb_hits>20</nb_hits>
<avg_time_on_page>00:38:00</avg_time_on_page>
<nb_visits>2</nb_visits>
<nb_hits>2</nb_hits>
<avg_time_on_page>00:00:00</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>100%</exit_rate>
<avg_time_generation>0s</avg_time_generation>
</row>
<row>
<label>/webradio</label>
<nb_visits>2</nb_visits>
<nb_hits>14</nb_hits>
<avg_time_on_page>00:29:00</avg_time_on_page>
<nb_hits>2</nb_hits>
<avg_time_on_page>00:24:59</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
<avg_time_generation>0s</avg_time_generation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@
<result>
<row>
<label>/movies</label>
<nb_visits>4</nb_visits>
<nb_visits>2</nb_visits>
<nb_uniq_visitors>2</nb_uniq_visitors>
<nb_hits>20</nb_hits>
<sum_time_spent>9120</sum_time_spent>
<entry_nb_uniq_visitors>2</entry_nb_uniq_visitors>
<entry_nb_visits>2</entry_nb_visits>
<entry_nb_actions>8</entry_nb_actions>
<entry_sum_visit_length>5522</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<nb_hits>2</nb_hits>
<sum_time_spent>0</sum_time_spent>
<exit_nb_uniq_visitors>2</exit_nb_uniq_visitors>
<exit_nb_visits>4</exit_nb_visits>
<avg_time_on_page>2280</avg_time_on_page>
<exit_nb_visits>2</exit_nb_visits>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>100%</exit_rate>
<url>http://example.org/movies</url>
Expand All @@ -22,14 +17,14 @@
<label>/webradio</label>
<nb_visits>2</nb_visits>
<nb_uniq_visitors>2</nb_uniq_visitors>
<nb_hits>14</nb_hits>
<sum_time_spent>3480</sum_time_spent>
<nb_hits>2</nb_hits>
<sum_time_spent>2998</sum_time_spent>
<entry_nb_uniq_visitors>2</entry_nb_uniq_visitors>
<entry_nb_visits>2</entry_nb_visits>
<entry_nb_actions>26</entry_nb_actions>
<entry_sum_visit_length>7082</entry_sum_visit_length>
<entry_nb_actions>30</entry_nb_actions>
<entry_sum_visit_length>7202</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<avg_time_on_page>1740</avg_time_on_page>
<avg_time_on_page>1499</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
<url>http://example.org/webradio</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,29 @@
<result>
<row>
<label>/movies</label>
<nb_visits>4</nb_visits>
<nb_hits>20</nb_hits>
<sum_time_spent>9120</sum_time_spent>
<entry_nb_visits>2</entry_nb_visits>
<entry_nb_actions>8</entry_nb_actions>
<entry_sum_visit_length>5522</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<exit_nb_visits>4</exit_nb_visits>
<nb_visits>2</nb_visits>
<nb_hits>2</nb_hits>
<sum_time_spent>0</sum_time_spent>
<exit_nb_visits>2</exit_nb_visits>
<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
<sum_daily_entry_nb_uniq_visitors>2</sum_daily_entry_nb_uniq_visitors>
<sum_daily_exit_nb_uniq_visitors>2</sum_daily_exit_nb_uniq_visitors>
<avg_time_on_page>2280</avg_time_on_page>
<avg_time_on_page>0</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>100%</exit_rate>
<url>http://example.org/movies</url>
</row>
<row>
<label>/webradio</label>
<nb_visits>2</nb_visits>
<nb_hits>14</nb_hits>
<sum_time_spent>3480</sum_time_spent>
<nb_hits>2</nb_hits>
<sum_time_spent>2998</sum_time_spent>
<entry_nb_visits>2</entry_nb_visits>
<entry_nb_actions>26</entry_nb_actions>
<entry_sum_visit_length>7082</entry_sum_visit_length>
<entry_nb_actions>30</entry_nb_actions>
<entry_sum_visit_length>7202</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
<sum_daily_entry_nb_uniq_visitors>2</sum_daily_entry_nb_uniq_visitors>
<avg_time_on_page>1740</avg_time_on_page>
<avg_time_on_page>1499</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
<url>http://example.org/webradio</url>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_pageviews>34</nb_pageviews>
<nb_uniq_pageviews>6</nb_uniq_pageviews>
<nb_pageviews>4</nb_pageviews>
<nb_uniq_pageviews>4</nb_uniq_pageviews>
<nb_downloads>0</nb_downloads>
<nb_uniq_downloads>0</nb_uniq_downloads>
<nb_outlinks>0</nb_outlinks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_pageviews>34</nb_pageviews>
<nb_uniq_pageviews>6</nb_uniq_pageviews>
<nb_pageviews>4</nb_pageviews>
<nb_uniq_pageviews>4</nb_uniq_pageviews>
<nb_downloads>0</nb_downloads>
<nb_uniq_downloads>0</nb_uniq_downloads>
<nb_outlinks>0</nb_outlinks>
Expand Down
Loading

0 comments on commit e5db16a

Please sign in to comment.