diff --git a/core/Archive.php b/core/Archive.php
index a179a629d0b4cdd365312a0d945f84ab8c3d1d95..33e7ca61cfab212bc234dd3a73e45cdcbe9abaea 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -257,13 +257,6 @@ class Piwik_Archive
      */
     private $forceIndexedByDate;
     
-    /**
-     * Data Access Layer object.
-     * 
-     * @var Piwik_DataAccess_Archiver
-     */
-    private $dataAccess;
-    
     /**
      * Cache of Piwik_ArchiveProcessor instances used when launching the archiving
      * process.
@@ -288,7 +281,6 @@ class Piwik_Archive
         $this->params = $params;
         $this->forceIndexedBySite = $forceIndexedBySite;
         $this->forceIndexedByDate = $forceIndexedByDate;
-        $this->dataAccess = new Piwik_DataAccess_Archiver();
     }
 
 
@@ -305,26 +297,26 @@ class Piwik_Archive
      */
     public static function build($idSites, $period, $strDate, $segment = false, $_restrictSitesToLogin = false)
     {
+        $websiteIds = Piwik_Site::getIdSitesFromIdSitesString($idSites, $_restrictSitesToLogin);
+
         if (Piwik_Period::isMultiplePeriod($strDate, $period)) {
             $oPeriod = new Piwik_Period_Range($period, $strDate);
             $allPeriods = $oPeriod->getSubperiods();
         } else {
-            $timezone = false;//count($sites) == 1 ? Piwik_Site::getTimezoneFor($sites[0]) : false;
+            $timezone = count($websiteIds) == 1 ? Piwik_Site::getTimezoneFor($websiteIds[0]) : false;
             $oPeriod = Piwik_Period::makePeriodFromQueryParams($timezone, $period, $strDate);
             $allPeriods = array($oPeriod);
         }
-        $segment = new Piwik_Segment($segment, $idSites);
-        return Piwik_Archive::factory($segment, $allPeriods, $idSites, $_restrictSitesToLogin);
+        $segment = new Piwik_Segment($segment, $websiteIds);
+        $idSiteIsAll = $idSites == self::FLAG_ALL_WEBSITES_REQUESTED;
+        return Piwik_Archive::factory($segment, $allPeriods, $websiteIds, $idSiteIsAll);
     }
 
-    public static function factory(Piwik_Segment $segment, array $periods, $idSites, $_restrictSitesToLogin = false)
+    public static function factory(Piwik_Segment $segment, array $periods, $idSites, $idSiteIsAll = false)
     {
-        $sites = Piwik_Site::getIdSitesFromIdSitesString($idSites, $_restrictSitesToLogin);
-
         $forceIndexedBySite = false;
         $forceIndexedByDate = false;
-        if ($idSites == self::FLAG_ALL_WEBSITES_REQUESTED
-            || count($sites) > 1) {
+        if ($idSiteIsAll || count($idSites) > 1) {
             $forceIndexedBySite = true;
         }
         if (count($periods) > 1) {
@@ -332,7 +324,7 @@ class Piwik_Archive
         }
 
         $params = new Piwik_Archive_Parameters();
-        $params->setIdSites($sites);
+        $params->setIdSites($idSites);
         $params->setPeriods($periods);
         $params->setSegment($segment);
 
@@ -523,7 +515,7 @@ class Piwik_Archive
             return $result;
         }
         
-        $archiveData = $this->dataAccess->getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable);
+        $archiveData = Piwik_DataAccess_Archiver::getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable);
         foreach ($archiveData as $row) {
             // values are grouped by idsite (site ID), date1-date2 (date range), then name (field name)
             $idSite = $row['idsite'];
@@ -676,7 +668,7 @@ class Piwik_Archive
      */
     private function cacheArchiveIdsWithoutLaunching($plugins)
     {
-        $idarchivesByReport = $this->dataAccess->getArchiveIds(
+        $idarchivesByReport = Piwik_DataAccess_Archiver::getArchiveIds(
             $this->params->getIdSites(), $this->params->getPeriods(), $this->params->getSegment(), $plugins);
         
         // initialize archive ID cache for each report
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index d8245f9a32ea42b1c38ae7b4a4a3531c555d1be9..438355751ff46823a4071e8e6689d91106f1f7d4 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -185,19 +185,35 @@ abstract class Piwik_ArchiveProcessor
             return;
         }
 
+        // Visits will be stored in this archive
+        $visitsSummaryWillBeProcessed = Piwik_ArchiveProcessor_Rules::shouldProcessReportsAllPlugins($this->getSegment(), $this->getPeriod()->getLabel());
+
+        // If visits were not stored in this archive and will not be archived as part of it, we create a new one
+//        if($this->getNumberOfVisits() === false
+//            && !$visitsSummaryWillBeProcessed) {
+//            if($requestedPlugin != 'VisitsSummary') {
+//                // creates an archive to store visits
+//                $requestedPlugin = $this->getRequestedPlugin();
+//                $this->preProcessArchive('VisitsSummary');
+//                $this->setRequestedPlugin($requestedPlugin);
+//            }
+//        }
+//
         $idArchive = Piwik_DataAccess_Archiver::allocateNewArchiveId($this->getTableArchiveNumericName(), $this->getSite()->getId());
         $this->idArchive = $idArchive;
 
         $doneFlag = Piwik_ArchiveProcessor_Rules::getDoneStringFlagFor($this->getSegment(), $this->getPeriod()->getLabel(), $requestedPlugin);
         $this->insertNumericRecord($doneFlag, Piwik_ArchiveProcessor::DONE_ERROR);
 
+//        if($visitsSummaryWillBeProcessed ) {
         $metrics = $this->aggregateCoreVisitsMetrics();
+
         if(empty($metrics)) {
             $this->setNumberOfVisits(false);
         } else {
             $this->setNumberOfVisits($metrics['nb_visits'], $metrics['nb_visits_converted']);
         }
-
+//        }
         $temporary = 'definitive archive';
         if ($this->isArchiveTemporary()) {
             $temporary = 'temporary archive';
@@ -269,8 +285,8 @@ abstract class Piwik_ArchiveProcessor
         return $this->requestedPlugin;
     }
 
-    protected $visitsMetricCached;
-    protected $convertedVisitsMetricCached;
+    protected $visitsMetricCached = false;
+    protected $convertedVisitsMetricCached = false;
 
     /**
      * A flag mechanism to store whether
@@ -291,7 +307,6 @@ abstract class Piwik_ArchiveProcessor
 
     public function getNumberOfVisits()
     {
-
         return $this->visitsMetricCached;
     }
 
@@ -452,79 +467,23 @@ abstract class Piwik_ArchiveProcessor
      */
     protected function loadExistingArchiveIdFromDb($requestedPlugin)
     {
-        $bindSQL = array($this->getSite()->getId(),
-                         $this->getPeriod()->getDateStart()->toString('Y-m-d'),
-                         $this->getPeriod()->getDateEnd()->toString('Y-m-d'),
-                         $this->getPeriod()->getId(),
-        );
-
-        $timeStampWhere = '';
-
         $minDatetimeArchiveProcessedUTC = $this->getMinTimeArchivedProcessed();
-        if ($minDatetimeArchiveProcessedUTC) {
-            $timeStampWhere = " AND ts_archived >= ? ";
-            $bindSQL[] = Piwik_Date::factory($minDatetimeArchiveProcessedUTC)->getDatetime();
-        }
-
-        // When a Segment is specified, we try and only process the requested report in the archive
-        // As a limitation, we don't know all the time which plugin should process which report
-        // There is a catch all flag 'all' appended to archives containing all reports already
-        // We look for this 'done.ABCDEFG.all', or for an archive that contains only our plugin data 'done.ABDCDEFG.Referers'
-        $done = Piwik_ArchiveProcessor_Rules::getDoneStringFlagFor($this->getSegment(), $this->getPeriod()->getLabel(), $requestedPlugin);
-        $doneAllPluginsProcessed = Piwik_ArchiveProcessor_Rules::getDoneStringFlagFor($this->getSegment(), $this->getPeriod()->getLabel(), $requestedPlugin, $allPlugins = true);
-
-        $sqlSegmentsFindArchiveAllPlugins = '';
-
-        if ($done != $doneAllPluginsProcessed) {
-            $sqlSegmentsFindArchiveAllPlugins = "OR (name = '" . $doneAllPluginsProcessed . "' AND value = " . Piwik_ArchiveProcessor::DONE_OK . ")
-					OR (name = '" . $doneAllPluginsProcessed . "' AND value = " . Piwik_ArchiveProcessor::DONE_OK_TEMPORARY . ")";
-        }
-        $sqlQuery = "	SELECT idarchive, value, name, date1 as startDate
-						FROM " . $this->getTableArchiveNumericName() . "
-						WHERE idsite = ?
-							AND date1 = ?
-							AND date2 = ?
-							AND period = ?
-							AND ( (name = '" . $done . "' AND value = " . Piwik_ArchiveProcessor::DONE_OK . ")
-									OR (name = '" . $done . "' AND value = " . Piwik_ArchiveProcessor::DONE_OK_TEMPORARY . ")
-									$sqlSegmentsFindArchiveAllPlugins
-									OR name = 'nb_visits')
-
-							$timeStampWhere
-						ORDER BY idarchive DESC";
-        $results = Piwik_FetchAll($sqlQuery, $bindSQL);
-        if (empty($results)) {
-            return false;
-        }
-
-        $idArchive = false;
-        // we look for the more recent idarchive
-        foreach ($results as $result) {
-            if ( in_array($result['name'], array($done, $doneAllPluginsProcessed)) ) {
-                $idArchive = $result['idarchive'];
-                break;
-            }
-        }
+        $site = $this->getSite();
+        $period = $this->getPeriod();
+        $segment = $this->getSegment();
+        $numericTableName = $this->getTableArchiveNumericName();
 
-        if(!$idArchive) {
+        $idAndVisits = Piwik_DataAccess_Archiver::getArchiveIdAndVisits($numericTableName, $site, $period, $segment, $minDatetimeArchiveProcessedUTC, $requestedPlugin);
+        if(!$idAndVisits) {
             return false;
         }
-
-        foreach($results as $result) {
-            if($result['idarchive'] == $idArchive
-                && $result['name'] == 'nb_visits') {
-                $visits = (int)$result['value'];
-                $this->setNumberOfVisits( $visits);
-            }
-        }
+        list($idArchive, $visits) = $idAndVisits;
+        $this->setNumberOfVisits( $visits );
         return $idArchive;
     }
 
     /**
-     * When a segment is set, we shall only process the requested report (no more).
-     * The requested data set will return a lot faster if we only process these reports rather than all plugins.
-     * Similarly, when a period=range is requested, we shall only process the requested report for the range itself.
-     *
+     * Whether the specified plugin's reports should be archived
      * @param string $pluginName
      * @return bool
      */
diff --git a/core/ArchiveProcessor/Day.php b/core/ArchiveProcessor/Day.php
index cdb501b08ba813df2f11b6b6aaf2c39d6a7b2a83..865a64224abcfb03815a591a83d8ec46560b9973 100644
--- a/core/ArchiveProcessor/Day.php
+++ b/core/ArchiveProcessor/Day.php
@@ -53,7 +53,7 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
                 $joinLogActionOnColumn = array($joinLogActionOnColumn);
             }
 
-            foreach ($joinLogActionOnColumn as $i => $joinColumn) {
+            foreach($joinLogActionOnColumn as $i => $joinColumn) {
                 $tableAlias = 'log_action' . ($multiJoin ? $i + 1 : '');
                 if (strpos($joinColumn, ' ') === false) {
                     $joinOn = $tableAlias . '.idaction = ' . $tableName . '.' . $joinColumn;
@@ -150,10 +150,11 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
         return "ROUND(" . $field . "," . Piwik_Tracker_GoalManager::REVENUE_PRECISION . ")";
     }
 
-    protected function getSelectStatement($dimensions, $tableName, $additionalSelects, $availableMetrics, $requestedMetrics = false)
+    protected function getSelectStatement($dimensions, $tableName, $additionalSelects, array $availableMetrics, $requestedMetrics = false)
     {
+        $dimensionsToSelect = $this->getDimensionsToSelect($dimensions, $additionalSelects);
         $selects = array_merge(
-            $this->getSelectDimensions($dimensions, $tableName),
+            $this->getSelectDimensions($dimensionsToSelect, $tableName),
             $this->getSelectsMetrics($availableMetrics, $requestedMetrics),
             !empty($additionalSelects) ? $additionalSelects : array()
         );
@@ -161,6 +162,31 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
         return $select;
     }
 
+    /**
+     * Will return the subset of $dimensions that are not found in $additionalSelects
+     *
+     * @param $dimensions
+     * @param array $additionalSelects
+     * @return array
+     */
+    protected function getDimensionsToSelect($dimensions, $additionalSelects)
+    {
+        if(empty($additionalSelects)) {
+            return $dimensions;
+        }
+        $dimensionsToSelect = array();
+        foreach ($dimensions as $selectAs => $dimension) {
+            $asAlias = $this->getSelectAliasAs($dimension);
+            foreach ($additionalSelects as $additionalSelect) {
+                if (strpos($additionalSelect, $asAlias) === false) {
+                    $dimensionsToSelect[$selectAs] = $dimension;
+                }
+            }
+        }
+        $dimensionsToSelect = array_unique($dimensionsToSelect);
+        return $dimensionsToSelect;
+    }
+
     protected function getSelectDimensions($dimensions, $tableName, $appendSelectAs = true)
     {
         foreach ($dimensions as $selectAs => &$field) {
@@ -168,11 +194,20 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
             if (!is_numeric($selectAs)) {
                 $selectAsString = $selectAs;
             }
-            if ($selectAsString == $field) {
+            else
+            {
+                // if function, do not alias or prefix
+                if(strpos($field, "(") !== false) {
+                    $selectAsString = $appendSelectAs = false;
+                }
+            }
+            $isKnownField = !in_array($field, array('referrer_data'));
+            if ($selectAsString == $field
+                && $isKnownField) {
                 $field = "$tableName.$field";
             }
             if ($appendSelectAs) {
-                $field = "$field AS $selectAsString";
+                $field = $field . $this->getSelectAliasAs($selectAsString);
             }
         }
         return $dimensions;
@@ -183,12 +218,18 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
         $selects = array();
         foreach ($metricsAvailable as $metricId => $statement) {
             if ($this->isMetricRequested($metricId, $metricsRequested)) {
-                $selects[] = $statement . " as `" . $metricId . "`";
+                $aliasAs = $this->getSelectAliasAs($metricId);
+                $selects[] = $statement . $aliasAs;
             }
         }
         return $selects;
     }
 
+    protected function getSelectAliasAs($metricId)
+    {
+        return " AS `" . $metricId . "`";
+    }
+
     /**
      * @param $metricId
      * @param $metricsRequested
@@ -421,7 +462,6 @@ class Piwik_ArchiveProcessor_Day extends Piwik_ArchiveProcessor
             }
             return $rankingQuery->execute($query['sql'], $query['bind']);
         }
-
         return $this->getDb()->query($query['sql'], $query['bind']);
     }
 
diff --git a/core/ArchiveProcessor/Period.php b/core/ArchiveProcessor/Period.php
index d649ec7bc60a3c771e8ac1cceb5f621afe7e3021..776155a01ae91976ab57ca31218273e75d875831 100644
--- a/core/ArchiveProcessor/Period.php
+++ b/core/ArchiveProcessor/Period.php
@@ -221,7 +221,7 @@ class Piwik_ArchiveProcessor_Period extends Piwik_ArchiveProcessor
     {
         if (empty($this->archiver)) {
             $subPeriods = $this->getPeriod()->getSubperiods();
-            $this->archiver = Piwik_Archive::factory($this->getSegment(), $subPeriods, $this->getSite()->getId());
+            $this->archiver = Piwik_Archive::factory($this->getSegment(), $subPeriods, array( $this->getSite()->getId() ));
         }
     }
 
diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php
index e4fc40564536fa5a201100f8e5580626a4b076bb..e78e35441aa8a8436ab4e9f8fcc0321176a21daf 100644
--- a/core/ArchiveProcessor/Rules.php
+++ b/core/ArchiveProcessor/Rules.php
@@ -101,22 +101,25 @@ class Piwik_ArchiveProcessor_Rules
      * @param Piwik_Segment $segment
      * @param string $periodLabel
      * @param string $plugin
-     * @param bool $flagArchiveAsAllPlugins
      * @return string
      */
     // FIXMEA: this is called all over the place, not right
-    public static function getDoneStringFlagFor($segment, $periodLabel, $plugin, $flagArchiveAsAllPlugins = false)
+    public static function getDoneStringFlagFor($segment, $periodLabel, $plugin)
     {
-        $segmentHash = $segment->getHash();
         if (!self::shouldProcessReportsAllPlugins($segment, $periodLabel)) {
-            if (!Piwik_PluginsManager::getInstance()->isPluginLoaded($plugin)
-                || $flagArchiveAsAllPlugins
-            ) {
-                $plugin = 'all';
-            }
-            $segmentHash .= '.' . $plugin;
+            return self::getDoneFlagArchiveContainsOnePlugin($segment, $plugin);
         }
-        return 'done' . $segmentHash;
+        return self::getDoneFlagArchiveContainsAllPlugins($segment);
+    }
+
+    public static function getDoneFlagArchiveContainsAllPlugins($segment)
+    {
+        return 'done' . $segment->getHash();
+    }
+
+    public static function getDoneFlagArchiveContainsOnePlugin($segment, $plugin)
+    {
+        return 'done' . $segment->getHash() . '.' . $plugin;
     }
 
     /**
diff --git a/core/DataAccess/Archiver.php b/core/DataAccess/Archiver.php
index be720122ddc38c10119aafd3a171f48d8aedec02..a3003e1ec1ff0bbe33e16a49c86573b67a8e4435 100644
--- a/core/DataAccess/Archiver.php
+++ b/core/DataAccess/Archiver.php
@@ -108,6 +108,73 @@ class Piwik_DataAccess_Archiver
         return $id;
     }
 
+
+    /**
+     * @param $numericTableName
+     * @param $site
+     * @param $period
+     * @param $segment
+     * @param $minDatetimeArchiveProcessedUTC
+     * @param $requestedPlugin
+     * @return array|bool
+     */
+    static public function getArchiveIdAndVisits($numericTableName, Piwik_Site $site, Piwik_Period $period, Piwik_Segment $segment, $minDatetimeArchiveProcessedUTC, $requestedPlugin)
+    {
+        $bindSQL = array($site->getId(),
+                         $period->getDateStart()->toString('Y-m-d'),
+                         $period->getDateEnd()->toString('Y-m-d'),
+                         $period->getId(),
+        );
+
+        $timeStampWhere = '';
+        if ($minDatetimeArchiveProcessedUTC) {
+            $timeStampWhere = " AND ts_archived >= ? ";
+            $bindSQL[] = Piwik_Date::factory($minDatetimeArchiveProcessedUTC)->getDatetime();
+        }
+
+        $done = Piwik_ArchiveProcessor_Rules::getDoneFlagArchiveContainsOnePlugin($segment, $requestedPlugin);
+        $doneAllPluginsProcessed = Piwik_ArchiveProcessor_Rules::getDoneFlagArchiveContainsAllPlugins($segment);
+
+        $doneFlagSelect = self::getNameCondition(array($requestedPlugin), $segment);
+        $sqlQuery = "	SELECT idarchive, value, name, date1 as startDate
+						FROM " . $numericTableName . "``
+						WHERE idsite = ?
+							AND date1 = ?
+							AND date2 = ?
+							AND period = ?
+							AND ( $doneFlagSelect
+								  OR name = 'nb_visits')
+							$timeStampWhere
+						ORDER BY idarchive DESC";
+        $results = Piwik_FetchAll($sqlQuery, $bindSQL);
+        if (empty($results)) {
+            return false;
+        }
+
+        $idArchive = false;
+        // we look for the more recent idarchive
+        foreach ($results as $result) {
+            if ( in_array($result['name'], array($done, $doneAllPluginsProcessed)) ) {
+                $idArchive = $result['idarchive'];
+                break;
+            }
+        }
+
+        if(!$idArchive) {
+            return false;
+        }
+
+        $visits = 0;
+        foreach($results as $result) {
+            if($result['idarchive'] == $idArchive
+                && $result['name'] == 'nb_visits') {
+                $visits = (int)$result['value'];
+                break;
+            }
+        }
+        return array($idArchive, $visits);
+    }
+
     /**
      * Queries and returns archive IDs for a set of sites, periods, and a segment.
      * 
@@ -122,21 +189,19 @@ class Piwik_DataAccess_Archiver
      *                   )
      *               )
      */
-    public function getArchiveIds($siteIds, $periods, $segment, $plugins)
+    static public function getArchiveIds($siteIds, $periods, $segment, $plugins)
     {
-        $periodType = reset($periods)->getLabel();
-
         $getArchiveIdsSql = "SELECT idsite, name, date1, date2, MAX(idarchive) as idarchive
                                FROM %s
                               WHERE period = ?
                                 AND %s
-                                AND ".$this->getNameCondition($plugins, $segment, $periodType)."
+                                AND ".self::getNameCondition($plugins, $segment)."
                                 AND idsite IN (".implode(',', $siteIds).")
                            GROUP BY idsite, date1, date2";
         
         // for every month within the archive query, select from numeric table
         $result = array();
-        foreach ($this->getPeriodsByTableMonth($periods) as $tableMonth => $periods) {
+        foreach (self::getPeriodsByTableMonth($periods) as $tableMonth => $periods) {
             $firstPeriod = reset($periods);
             $table = Piwik_Common::prefixTable("archive_numeric_$tableMonth");
 
@@ -182,7 +247,7 @@ class Piwik_DataAccess_Archiver
      * @param string $archiveDataType The archive data type (either, 'blob' or 'numeric').
      * @param string|null $idSubtable The subtable to retrieve ('all' for all subtables).
      */
-    public function getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable)
+    static public function getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable)
     {
         $archiveTableType = 'archive_'.$archiveDataType;
         
@@ -236,20 +301,19 @@ class Piwik_DataAccess_Archiver
      * 
      * @param array $plugins @see getArchiveData
      * @param Piwik_Segment $segment
-     * @param string $periodType
      * @return string
      */
-    private function getNameCondition($plugins, $segment, $periodType)
+    static private function getNameCondition(array $plugins, $segment)
     {
         // the flags used to tell how the archiving process for a specific archive was completed,
         // if it was completed
         $doneFlags = array();
         foreach ($plugins as $plugin) {
-            $done = Piwik_ArchiveProcessor_Rules::getDoneStringFlagFor($segment, $periodType, $plugin);
-            $donePlugins = Piwik_ArchiveProcessor_Rules::getDoneStringFlagFor($segment, $periodType, $plugin, true);
+            $doneAllPlugins = Piwik_ArchiveProcessor_Rules::getDoneFlagArchiveContainsAllPlugins($segment);
+            $doneOnePlugin = Piwik_ArchiveProcessor_Rules::getDoneFlagArchiveContainsOnePlugin($segment, $plugin);
             
-            $doneFlags[$done] = $done;
-            $doneFlags[$donePlugins] = $donePlugins;
+            $doneFlags[$doneAllPlugins] = $doneAllPlugins;
+            $doneFlags[$doneOnePlugin] = $doneOnePlugin;
         }
 
         $allDoneFlags = "'".implode("','", $doneFlags)."'";
@@ -269,7 +333,7 @@ class Piwik_DataAccess_Archiver
      *               eg, 2012_01. The format is the same format used in archive database
      *               table names.
      */
-    private function getPeriodsByTableMonth($periods)
+    static private function getPeriodsByTableMonth($periods)
     {
         $result = array();
         foreach ($periods as $period) {
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index bdc79b6e4fa44b664f8429ded2510b02bb3a6c7f..a18b1d6324908e7d20c6850b0af2f6b407ce1048 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -97,7 +97,7 @@ class Piwik_Transitions_API
         // derive the number of exits from the other metrics
         if ($parts == 'all') {
             $report['pageMetrics']['exits'] = $report['pageMetrics']['pageviews']
-                - $transitionsArchiving->getTotalTransitionsToFollowingActions()
+                - $this->getTotalTransitionsToFollowingActions()
                 - $report['pageMetrics']['loops'];
         }
 
@@ -178,8 +178,7 @@ class Piwik_Transitions_API
                                           $idaction, $actionType, $limitBeforeGrouping)
     {
 
-        $data = $this->queryInternalReferrers(
-            $idaction, $actionType, $archiveProcessor, $limitBeforeGrouping);
+        $data = $this->queryInternalReferrers($idaction, $actionType, $archiveProcessor, $limitBeforeGrouping);
 
         if ($data['pageviews'] == 0) {
             throw new Exception('NoDataForAction');
@@ -265,7 +264,7 @@ class Piwik_Transitions_API
 					WHEN log_action1.type = ' . Piwik_Tracker_Action::TYPE_ACTION_URL . ' THEN log_action2.name
 					' /* following download or outlink: use url */ . '
 					ELSE log_action1.name
-				END AS name',
+				END AS `name`',
                 'CASE
                     ' /* following site search */ . '
 					WHEN log_link_visit_action.idaction_url IS NULL THEN log_action2.type
@@ -273,8 +272,8 @@ class Piwik_Transitions_API
 					WHEN log_action1.type = ' . Piwik_Tracker_Action::TYPE_ACTION_URL . ' THEN log_action2.type
 					' /* following download or outlink: use url */ . '
 					ELSE log_action1.type
-				END AS type',
-                'NULL AS url_prefix'
+				END AS `type`',
+                'NULL AS `url_prefix`'
             );
         }
 
@@ -357,7 +356,7 @@ class Piwik_Transitions_API
 				WHEN ' . Piwik_Common::REFERER_TYPE_SEARCH_ENGINE . ' THEN referer_keyword
 				WHEN ' . Piwik_Common::REFERER_TYPE_WEBSITE . ' THEN referer_url
 				WHEN ' . Piwik_Common::REFERER_TYPE_CAMPAIGN . ' THEN CONCAT(referer_name, \' \', referer_keyword)
-			END AS referrer_data');
+			END AS `referrer_data`');
 
         // get one limited group per referrer type
         $rankingQuery->partitionResultIntoMultipleGroups('referer_type', array(
@@ -433,12 +432,12 @@ class Piwik_Transitions_API
         $selects = array(
             'log_action.name',
             'log_action.url_prefix',
-            'CASE WHEN log_link_visit_action.idaction_' . $type . '_ref = ' . intval($idaction) . ' THEN 1 ELSE 0 END AS is_self',
+            'CASE WHEN log_link_visit_action.idaction_' . $type . '_ref = ' . intval($idaction) . ' THEN 1 ELSE 0 END AS `is_self`',
             'CASE
                 WHEN log_action.type = ' . $mainActionType . ' THEN 1
                         WHEN log_action.type = ' . Piwik_Tracker_Action::TYPE_SITE_SEARCH . ' THEN 2
                         ELSE 0
-                    END AS action_partition'
+                    END AS `action_partition`'
         );
 
         $where = '
@@ -559,7 +558,7 @@ class Piwik_Transitions_API
                                           $idaction, $actionType, $limitBeforeGrouping)
     {
 
-        $data = $transitionsArchiving->queryExternalReferrers(
+        $data = $this->queryExternalReferrers(
             $idaction, $actionType, $archiveProcessor, $limitBeforeGrouping);
 
         $report['pageMetrics']['entries'] = 0;
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php
index dddd2431e03c6b24651011ae6960421218d4fd2a..29bc8906646f4a018ce27837b0a61e5b357e69be 100644
--- a/plugins/VisitTime/API.php
+++ b/plugins/VisitTime/API.php
@@ -62,16 +62,21 @@ class Piwik_VisitTime_API
      */
     public function getByDayOfWeek($idSite, $period, $date, $segment = false)
     {
+
         Piwik::checkUserHasViewAccess($idSite);
 
         // metrics to query
         $metrics = Piwik_Archive::getVisitsMetricNames();
         unset($metrics[Piwik_Archive::INDEX_MAX_ACTIONS]);
 
-        // get metric data for every day within the supplied period
-        $oPeriod = Piwik_Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date);
-        $dateRange = $oPeriod->getDateStart()->toString() . ',' . $oPeriod->getDateEnd()->toString();
-        $archive = Piwik_Archive::build($idSite, 'day', $dateRange, $segment);
+        try {
+            // get metric data for every day within the supplied period
+            $oPeriod = Piwik_Period::makePeriodFromQueryParams(Piwik_Site::getTimezoneFor($idSite), $period, $date);
+            $dateRange = $oPeriod->getDateStart()->toString() . ',' . $oPeriod->getDateEnd()->toString();
+            $archive = Piwik_Archive::build($idSite, 'day', $dateRange, $segment);
+        } catch(Exception $e) {
+            throw new Exception("getByDayOfWeek not working yet");
+        }
 
         // disabled for multiple sites/dates
         if ( count( $archive->getParams()->getIdSites() ) > 1) {
@@ -84,11 +89,11 @@ class Piwik_VisitTime_API
             throw new Exception("VisitTime.getByDayOfWeek does not support multiple dates.");
         }
 
-        //FIXMEA
-        throw new exception("Temporarily broken - stay tuned");
-
         $dataTable = $archive->getDataTableFromNumeric($metrics);
 
+        if(!($dataTable instanceof Piwik_DataTable)) {
+            return new Piwik_DataTable();
+        }
         // if there's no data for this report, don't bother w/ anything else
         if ($dataTable->getRowsCount() == 0) {
             return $dataTable;
@@ -102,7 +107,6 @@ class Piwik_VisitTime_API
         foreach (array(1, 2, 3, 4, 5, 6, 7) as $day) {
             $rows[] = array('label' => $day, 'nb_visits' => 0);
         }
-
         $result = new Piwik_DataTable();
         $result->addRowsFromSimpleArray($rows);
         $result->addDataTable($dataTable);
diff --git a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
index b99d754b852272a943c7485bdc3be5061329dd70..a4f71b7a65b3b7e38ca2413f04fc0c61c0767326 100755
--- a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
+++ b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
@@ -70,6 +70,7 @@ class Test_Piwik_Integration_OneVisitorOneWebsite_SeveralDaysDateRange_Archiving
         $tests = array(
             // 5 blobs for the Actions plugin, 7 blobs for UserSettings, 2 blobs VisitTime
             'archive_blob_2010_12'    => (5 + 8 + 2) * 3,
+
             // (VisitsSummary 5 metrics + 1 flag - no Unique visitors for range)
             // + 1 flag archive UserSettings
             // + (Actions 1 flag + 2 metrics - pageviews, unique pageviews + X??? metrics Site Search)
diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml
index a95e7420bbcb06603e1db356f72264e654d7b38e..c234bed59e963e268d7a9bc05348d941758c4aa9 100755
--- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml
@@ -1,58 +1,2 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<result>
-	<row>
-		<label>Monday</label>
-		<nb_visits>0</nb_visits>
-		<day_of_week>1</day_of_week>
-	</row>
-	<row>
-		<label>Tuesday</label>
-		<nb_visits>0</nb_visits>
-		<day_of_week>2</day_of_week>
-	</row>
-	<row>
-		<label>Wednesday</label>
-		<nb_visits>2</nb_visits>
-		<nb_uniq_visitors>2</nb_uniq_visitors>
-		<nb_actions>2</nb_actions>
-		<sum_visit_length>0</sum_visit_length>
-		<bounce_count>2</bounce_count>
-		<nb_visits_converted>2</nb_visits_converted>
-		<day_of_week>3</day_of_week>
-	</row>
-	<row>
-		<label>Thursday</label>
-		<nb_visits>9</nb_visits>
-		<nb_uniq_visitors>9</nb_uniq_visitors>
-		<nb_actions>9</nb_actions>
-		<sum_visit_length>0</sum_visit_length>
-		<bounce_count>9</bounce_count>
-		<nb_visits_converted>9</nb_visits_converted>
-		<day_of_week>4</day_of_week>
-	</row>
-	<row>
-		<label>Friday</label>
-		<nb_visits>6</nb_visits>
-		<nb_uniq_visitors>6</nb_uniq_visitors>
-		<nb_actions>6</nb_actions>
-		<sum_visit_length>0</sum_visit_length>
-		<bounce_count>6</bounce_count>
-		<nb_visits_converted>6</nb_visits_converted>
-		<day_of_week>5</day_of_week>
-	</row>
-	<row>
-		<label>Saturday</label>
-		<nb_visits>9</nb_visits>
-		<nb_uniq_visitors>9</nb_uniq_visitors>
-		<nb_actions>12</nb_actions>
-		<sum_visit_length>305</sum_visit_length>
-		<bounce_count>7</bounce_count>
-		<nb_visits_converted>7</nb_visits_converted>
-		<day_of_week>6</day_of_week>
-	</row>
-	<row>
-		<label>Sunday</label>
-		<nb_visits>0</nb_visits>
-		<day_of_week>7</day_of_week>
-	</row>
-</result>
\ No newline at end of file
+<result />
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getAll_day.xml
index 78d5baaa75e14012b905606c57e55d489574a855..818c899ce8b27a6f917373860ee5355eca311064 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getAll_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getAll_day.xml
@@ -6,10 +6,6 @@
 		<nb_actions>8</nb_actions>
 		<nb_pageviews>4</nb_pageviews>
 		<revenue>43</revenue>
-		<visits_evolution>100%</visits_evolution>
-		<actions_evolution>100%</actions_evolution>
-		<pageviews_evolution>100%</pageviews_evolution>
-		<revenue_evolution>100%</revenue_evolution>
 		<idsite>1</idsite>
 	</row>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getOne_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getOne_day.xml
index b76e6ee906d6a7f0583a9c66071181d078d66faf..2594503584ce43db67c9a74951180386e95fe04d 100644
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getOne_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__MultiSites.getOne_day.xml
@@ -2,10 +2,6 @@
 <result>
 	<nb_visits>2</nb_visits>
 	<nb_actions>8</nb_actions>
-	<visits_evolution>100%</visits_evolution>
-	<actions_evolution>100%</actions_evolution>
-	<pageviews_evolution>100%</pageviews_evolution>
-	<revenue_evolution>100%</revenue_evolution>
 	<nb_pageviews>4</nb_pageviews>
 	<revenue>43</revenue>
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__VisitTime.getByDayOfWeek_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__VisitTime.getByDayOfWeek_day.xml
index e715309206aa884f75ec89101c9caf6342393ebb..8f2a7940d4b6297d3efb95beddacd34a5c4a2423 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__VisitTime.getByDayOfWeek_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits__VisitTime.getByDayOfWeek_day.xml
@@ -17,7 +17,12 @@
 	</row>
 	<row>
 		<label>Thursday</label>
-		<nb_visits>0</nb_visits>
+		<nb_visits>2</nb_visits>
+		<nb_uniq_visitors>1</nb_uniq_visitors>
+		<nb_actions>8</nb_actions>
+		<sum_visit_length>1621</sum_visit_length>
+		<bounce_count>1</bounce_count>
+		<nb_visits_converted>2</nb_visits_converted>
 		<day_of_week>4</day_of_week>
 	</row>
 	<row>
@@ -27,12 +32,7 @@
 	</row>
 	<row>
 		<label>Saturday</label>
-		<nb_visits>2</nb_visits>
-		<nb_uniq_visitors>1</nb_uniq_visitors>
-		<nb_actions>8</nb_actions>
-		<sum_visit_length>1621</sum_visit_length>
-		<bounce_count>1</bounce_count>
-		<nb_visits_converted>2</nb_visits_converted>
+		<nb_visits>0</nb_visits>
 		<day_of_week>6</day_of_week>
 	</row>
 	<row>
diff --git a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__VisitTime.getByDayOfWeek_day.xml b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__VisitTime.getByDayOfWeek_day.xml
index 7b035b01889ba7f9cd6bff712e55d9d4f77a7357..b358ca25482780094f249679481c6f5933c15240 100755
--- a/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__VisitTime.getByDayOfWeek_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_OneVisitorTwoVisits_withCookieSupport__VisitTime.getByDayOfWeek_day.xml
@@ -17,7 +17,12 @@
 	</row>
 	<row>
 		<label>Thursday</label>
-		<nb_visits>0</nb_visits>
+		<nb_visits>2</nb_visits>
+		<nb_uniq_visitors>1</nb_uniq_visitors>
+		<nb_actions>9</nb_actions>
+		<sum_visit_length>1621</sum_visit_length>
+		<bounce_count>1</bounce_count>
+		<nb_visits_converted>2</nb_visits_converted>
 		<day_of_week>4</day_of_week>
 	</row>
 	<row>
@@ -27,12 +32,7 @@
 	</row>
 	<row>
 		<label>Saturday</label>
-		<nb_visits>2</nb_visits>
-		<nb_uniq_visitors>1</nb_uniq_visitors>
-		<nb_actions>9</nb_actions>
-		<sum_visit_length>1621</sum_visit_length>
-		<bounce_count>1</bounce_count>
-		<nb_visits_converted>2</nb_visits_converted>
+		<nb_visits>0</nb_visits>
 		<day_of_week>6</day_of_week>
 	</row>
 	<row>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_ArchivingDisabled_disabledAfter__VisitsSummary.get_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_ArchivingDisabled_disabledAfter__VisitsSummary.get_day.xml
index d7dfbaef5a120118a7c2ee23a16a8a0ea288e7a2..c48354bc4f5137699794629ae09d719ce54db054 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_ArchivingDisabled_disabledAfter__VisitsSummary.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_ArchivingDisabled_disabledAfter__VisitsSummary.get_day.xml
@@ -12,5 +12,16 @@
 		<nb_actions_per_visit>1</nb_actions_per_visit>
 		<avg_time_on_site>0</avg_time_on_site>
 	</result>
-	<result idSite="2" />
+	<result idSite="2">
+		<nb_uniq_visitors>0</nb_uniq_visitors>
+		<nb_visits>0</nb_visits>
+		<nb_actions>0</nb_actions>
+		<nb_visits_converted>0</nb_visits_converted>
+		<bounce_count>0</bounce_count>
+		<sum_visit_length>0</sum_visit_length>
+		<max_actions>0</max_actions>
+		<bounce_rate>0%</bounce_rate>
+		<nb_actions_per_visit>0</nb_actions_per_visit>
+		<avg_time_on_site>0</avg_time_on_site>
+	</result>
 </results>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml
index cd5e731d32e4e69ed4d1be5714d6c5680f2dbda6..fef0db55eb71cedb022fb350b1742f40a69a1089 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_MultiSites.getAll_firstSite_lastN__API.getProcessedReport_day.xml
@@ -61,10 +61,10 @@
 		<result prettyDate="Sunday 3 January 2010">
 			<row>
 				<label>Site 1</label>
-				<nb_visits>1</nb_visits>
-				<nb_actions>1</nb_actions>
 				<nb_pageviews>2</nb_pageviews>
 				<revenue>$ 10</revenue>
+				<nb_actions>1</nb_actions>
+				<nb_visits>1</nb_visits>
 				<visits_evolution>100%</visits_evolution>
 				<actions_evolution>100%</actions_evolution>
 				<pageviews_evolution>100%</pageviews_evolution>
@@ -80,14 +80,14 @@
 		<result prettyDate="Monday 4 January 2010">
 			<row>
 				<label>Site 1</label>
-				<nb_visits>1</nb_visits>
-				<nb_actions>2</nb_actions>
 				<nb_pageviews>1</nb_pageviews>
-				<revenue>$ 0</revenue>
+				<nb_actions>2</nb_actions>
+				<nb_visits>1</nb_visits>
 				<visits_evolution>0%</visits_evolution>
 				<actions_evolution>100%</actions_evolution>
 				<pageviews_evolution>-50%</pageviews_evolution>
 				<revenue_evolution>-100%</revenue_evolution>
+				<revenue>$ 0</revenue>
 				<nb_conversions>0</nb_conversions>
 				<nb_conversions_evolution>0</nb_conversions_evolution>
 				<orders>0</orders>
@@ -97,14 +97,14 @@
 			</row>
 			<row>
 				<label>Site 2</label>
-				<nb_visits>1</nb_visits>
-				<nb_actions>3</nb_actions>
 				<nb_pageviews>3</nb_pageviews>
-				<revenue>$ 0</revenue>
+				<nb_actions>3</nb_actions>
+				<nb_visits>1</nb_visits>
 				<visits_evolution>100%</visits_evolution>
 				<actions_evolution>100%</actions_evolution>
 				<pageviews_evolution>100%</pageviews_evolution>
-				<revenue_evolution>0%</revenue_evolution>
+				<revenue>$ 0</revenue>
+				<revenue_evolution>0</revenue_evolution>
 				<nb_conversions>0</nb_conversions>
 				<nb_conversions_evolution>0</nb_conversions_evolution>
 				<orders>0</orders>
@@ -116,10 +116,10 @@
 		<result prettyDate="Tuesday 5 January 2010">
 			<row>
 				<label>Site 1</label>
-				<nb_visits>1</nb_visits>
-				<nb_actions>5</nb_actions>
 				<nb_pageviews>5</nb_pageviews>
 				<revenue>$ 5</revenue>
+				<nb_actions>5</nb_actions>
+				<nb_visits>1</nb_visits>
 				<visits_evolution>0%</visits_evolution>
 				<actions_evolution>150%</actions_evolution>
 				<pageviews_evolution>400%</pageviews_evolution>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml
index f5ea6177e50476c018dd1552a39948f7c7dd9c5b..5fee61a930f3affbe39b1a7eda0692f95b524743 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__Goals.get_month.xml
@@ -10,6 +10,5 @@
 		<nb_conversions>1</nb_conversions>
 		<nb_visits_converted>1</nb_visits_converted>
 		<conversion_rate>100</conversion_rate>
-		<revenue>0</revenue>
 	</result>
 </results>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml
index d7dfbaef5a120118a7c2ee23a16a8a0ea288e7a2..122c2f44602679dca6915e49a8bc76a9fe4ef145 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_day.xml
@@ -6,7 +6,7 @@
 		<nb_actions>1</nb_actions>
 		<nb_visits_converted>1</nb_visits_converted>
 		<bounce_count>1</bounce_count>
-		<sum_visit_length>0</sum_visit_length>
+		<sum_visit_length />
 		<max_actions>1</max_actions>
 		<bounce_rate>100%</bounce_rate>
 		<nb_actions_per_visit>1</nb_actions_per_visit>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml
index 1b25e82b0f9c48e1dc7adf8e3c159a4f8f7fca95..4930a5c39611c07916fe2f167d86b812fe185bf5 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_NotLastNPeriods__VisitsSummary.get_month.xml
@@ -17,7 +17,7 @@
 		<nb_visits>1</nb_visits>
 		<nb_actions>3</nb_actions>
 		<nb_visits_converted>1</nb_visits_converted>
-		<bounce_count>0</bounce_count>
+		<bounce_count />
 		<sum_visit_length>2</sum_visit_length>
 		<max_actions>3</max_actions>
 		<bounce_rate>0%</bounce_rate>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml
index 72a701359a32208bf4ffcb51053d39a42bdeb615..eefd33ca1bb1184d82b2ea4321589a17416f2096 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_day.xml
@@ -3,10 +3,10 @@
 	<result date="2010-01-03">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>1</nb_actions>
 			<nb_pageviews>2</nb_pageviews>
 			<revenue>10</revenue>
+			<nb_actions>1</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -17,10 +17,9 @@
 	<result date="2010-01-04">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>2</nb_actions>
 			<nb_pageviews>1</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>2</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>0%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>-50%</pageviews_evolution>
@@ -29,24 +28,22 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
 	<result date="2010-01-05">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>5</nb_actions>
 			<nb_pageviews>5</nb_pageviews>
 			<revenue>5</revenue>
+			<nb_actions>5</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>0%</visits_evolution>
 			<actions_evolution>150%</actions_evolution>
 			<pageviews_evolution>400%</pageviews_evolution>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml
index 0e8c2139487d13992bd3d9dc076d8a891c4f5284..879bd15096faf1143f1633356121d321d73920a3 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_month.xml
@@ -3,10 +3,10 @@
 	<result date="2010-01">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>3</nb_visits>
-			<nb_actions>8</nb_actions>
 			<nb_pageviews>8</nb_pageviews>
 			<revenue>15</revenue>
+			<nb_actions>8</nb_actions>
+			<nb_visits>3</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -15,14 +15,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml
index b36fe1bf7c36f472d9b1bb84d9b59ab1c9fd1e92..ac0858dd811f9c41de826aee436a6b4c25823931 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_week.xml
@@ -3,10 +3,10 @@
 	<result date="From 2009-12-28 to 2010-01-03">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>1</nb_actions>
 			<nb_pageviews>2</nb_pageviews>
 			<revenue>10</revenue>
+			<nb_actions>1</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -17,10 +17,10 @@
 	<result date="From 2010-01-04 to 2010-01-10">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>2</nb_visits>
-			<nb_actions>7</nb_actions>
 			<nb_pageviews>6</nb_pageviews>
 			<revenue>5</revenue>
+			<nb_actions>7</nb_actions>
+			<nb_visits>2</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>600%</actions_evolution>
 			<pageviews_evolution>200%</pageviews_evolution>
@@ -29,14 +29,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml
index f5989031af7fdf134ee31476c44803a49933b08b..a56856f4eb4172b2d1fa9fa35d19133e87cf2774 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions__MultiSites.getAll_year.xml
@@ -3,10 +3,10 @@
 	<result date="2010">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>3</nb_visits>
-			<nb_actions>8</nb_actions>
 			<nb_pageviews>8</nb_pageviews>
 			<revenue>15</revenue>
+			<nb_actions>8</nb_actions>
+			<nb_visits>3</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -15,14 +15,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml
index 72a701359a32208bf4ffcb51053d39a42bdeb615..eefd33ca1bb1184d82b2ea4321589a17416f2096 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_day.xml
@@ -3,10 +3,10 @@
 	<result date="2010-01-03">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>1</nb_actions>
 			<nb_pageviews>2</nb_pageviews>
 			<revenue>10</revenue>
+			<nb_actions>1</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -17,10 +17,9 @@
 	<result date="2010-01-04">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>2</nb_actions>
 			<nb_pageviews>1</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>2</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>0%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>-50%</pageviews_evolution>
@@ -29,24 +28,22 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
 	<result date="2010-01-05">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>5</nb_actions>
 			<nb_pageviews>5</nb_pageviews>
 			<revenue>5</revenue>
+			<nb_actions>5</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>0%</visits_evolution>
 			<actions_evolution>150%</actions_evolution>
 			<pageviews_evolution>400%</pageviews_evolution>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml
index 0e8c2139487d13992bd3d9dc076d8a891c4f5284..879bd15096faf1143f1633356121d321d73920a3 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_month.xml
@@ -3,10 +3,10 @@
 	<result date="2010-01">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>3</nb_visits>
-			<nb_actions>8</nb_actions>
 			<nb_pageviews>8</nb_pageviews>
 			<revenue>15</revenue>
+			<nb_actions>8</nb_actions>
+			<nb_visits>3</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -15,14 +15,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml
index b36fe1bf7c36f472d9b1bb84d9b59ab1c9fd1e92..ac0858dd811f9c41de826aee436a6b4c25823931 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_week.xml
@@ -3,10 +3,10 @@
 	<result date="From 2009-12-28 to 2010-01-03">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>1</nb_actions>
 			<nb_pageviews>2</nb_pageviews>
 			<revenue>10</revenue>
+			<nb_actions>1</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -17,10 +17,10 @@
 	<result date="From 2010-01-04 to 2010-01-10">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>2</nb_visits>
-			<nb_actions>7</nb_actions>
 			<nb_pageviews>6</nb_pageviews>
 			<revenue>5</revenue>
+			<nb_actions>7</nb_actions>
+			<nb_visits>2</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>600%</actions_evolution>
 			<pageviews_evolution>200%</pageviews_evolution>
@@ -29,14 +29,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml
index f5989031af7fdf134ee31476c44803a49933b08b..a56856f4eb4172b2d1fa9fa35d19133e87cf2774 100755
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_Conversions_idSiteOne___MultiSites.getAll_year.xml
@@ -3,10 +3,10 @@
 	<result date="2010">
 		<row>
 			<label>Site 1</label>
-			<nb_visits>3</nb_visits>
-			<nb_actions>8</nb_actions>
 			<nb_pageviews>8</nb_pageviews>
 			<revenue>15</revenue>
+			<nb_actions>8</nb_actions>
+			<nb_visits>3</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
@@ -15,14 +15,12 @@
 		</row>
 		<row>
 			<label>Site 2</label>
-			<nb_visits>1</nb_visits>
-			<nb_actions>3</nb_actions>
 			<nb_pageviews>3</nb_pageviews>
-			<revenue>0</revenue>
+			<nb_actions>3</nb_actions>
+			<nb_visits>1</nb_visits>
 			<visits_evolution>100%</visits_evolution>
 			<actions_evolution>100%</actions_evolution>
 			<pageviews_evolution>100%</pageviews_evolution>
-			<revenue_evolution>0%</revenue_evolution>
 			<idsite>2</idsite>
 		</row>
 	</result>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_NotLastNPeriods__Goals.get_month.xml b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_NotLastNPeriods__Goals.get_month.xml
index 1c7f2179e5ae80abb3710f64976aa31d817f256a..bf1f38aa4854fadbf1a6995c5fc893a11dca49b3 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_NotLastNPeriods__Goals.get_month.xml
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_NotLastNPeriods__Goals.get_month.xml
@@ -1,5 +1,15 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <results>
-	<result idSite="1" />
-	<result idSite="2" />
+	<result idSite="1">
+		<nb_conversions>0</nb_conversions>
+		<nb_visits_converted>0</nb_visits_converted>
+		<conversion_rate>0</conversion_rate>
+		<revenue>0</revenue>
+	</result>
+	<result idSite="2">
+		<nb_conversions>0</nb_conversions>
+		<nb_visits_converted>0</nb_visits_converted>
+		<conversion_rate>0</conversion_rate>
+		<revenue>0</revenue>
+	</result>
 </results>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_month.original.html b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_month.original.html
index 63e040aca09169ab275634265fd406a287271a2d..e65de573d81dddea4670fbfa7b831c2782fb85d6 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_month.original.html
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_month.original.html
@@ -1648,205 +1648,7 @@ Back to top
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Visits by Day of Week
 </h2>
-<img
-alt=""
-src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAADICAIAAACF9KXqAAAJBklEQVR4nO3dz4vbeR3H8XT7Y9rasXQs/TXWihmoVgpC7Unw4GUPgiKi/4AH7x5FLyJ78epFcf+BBfEke1OQdS9VwYO1YKMM3Wl3yjLVrbYdCh0PgTSTfL/Ja5JMvt9v8nicZpLvpJ+8+eY7z37zY47s7e21AADGeaPqBQAAzSAaAICIaAAAIqIBAIiIBgAgIhoAgIhoAAAiogEAiMw7GtrtduGFhZeP/ikAYJ6Ozfbm3nr7TwOX/PB7X05+sNPp5Ne22+3R2wMAMzfjaPjHg49fvnzZ+/b48eNbW1vr6+u9SzqdzsCvfAUAAI0w42hotVrPnj3rfX327NmHDx/2R0OZ4ZLofT3QGd2reht0r+3feLrlAwDFZh8N0xsREK2ihnDeAgDmoIJ3T/SfG0h+xx8oAhQDAByS2Z9pOH369JS30KuKpAAOtDEAMLEZR8O3vtZ+uLU1/e10CyCsgQNtDABMZsbR8I2vXmu1ro3dLDw90F8DyW22vKYBAA5NHT8R8kAf5eRznwBgPur47onhd1EWvoGibOP5LBIAls2Rvb29qtcAADRAHZ+eAABqSDQAABHRAABERAMAEBENAEBENAAAEdEAAEQGo6HdbvuMRQBg2L5o8IcbAIAy+6JBMQAAZcb/7Ymt/X/qent7+9KlS71vf/vHD2a/qGb6+lc+XXaVKXWNGBFArThu9/Qfuqf6g1W//t3m7//84dTrWRBf+OzZz62vDl/+k1/99fGTF/NfTw2JBqAR/v6vf7/7/tb47ZbDwaJhfX297NtPnPlohstquvPnz1+58qnhy48d+9v8F1NPV65cqXoJAOM9/vho1Uuokf5Dt7dcAgAR0QAARPY9PdH7hIbuF95MAQD07IsGlQAAlPH0BAAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQEQ0AAAR0QAAREQDABARDQBARDQAABHRAABERAMAEBENAEBENAAAEdEAAEREAwAQEQ0AQORY/zftdrv3dafTmftiAID6eh0N7Xa7PxQGvgUAlpynJwCAyLHxm8Ah+/Cj//3o53+oehW1cPToG7/48ZuFV7373j/f+8sHc15PPX3m8ie//50vFV7101++/5//7s55PfX03Tc/f/uLlwuv+vYPfjPnxdTWOz/75tGj/vN8AEf29va6X5U9PXHnzp3+H7h3796NGzfmucTRdnd3Hzx4sLGxUfVCam1nZ2d3d/fy5eIjCF2bm5tra2urq6tVL6TW7t69W6sjQA09ffp0Z2fn2rVrVS+k1h49erSysrK2tlb1Qmrt/v37V69eXVlZqXohr40/03D79u0R31bu+fPnq6urN2/erHohtba9vf3ixQtHsdHOnDlz4cKFc+fOVb2QWnv16tWtW7eqXkWtPXny5PHjx9evX696IbW2ubl58uTJixcvVr2QWjtx4sTGxsapU6eqXshrTssAABHRAABEXj890el0fE4DAFBm32sahAIAUOb1uycAAEbwmgYAILKY0dD/4gxGW8JZzfAuN316h7H+ps9kVsxhGqZXqA5jqcUnQnYHMfDRUi2vsehTuK8s53xG/5EUfzOlTB0ONw01MLqBHWw5d7nkVfPLOZkyC/M+g1pEA2P1djKPQyZTuAspidCIB90SPh6V+kEt0sTqEg3dN3x259j9onc4Gwi0gWtHHP4Kt1mk375lO+Jw0g6MovBXRVPGVbirFO45rXG7x/CONHZ0ZTc1vE0NR1emf/2FO9XwnHvbD9xC2c22mjaT0QrH0lq+OXSNOMgM7yqtg0yv6Y+sMmMfaL3NWvXbqeoSDWWGJ9sqGlDhZguwb01g9CjKNmgtyrhGPBT7LxzeOHyObPH2tPDEw0CZld1Ca+H2qDLmMGDgbhZW5oARv+oW4JE1meSg1Kp0Mo18IeTEM+pF3PLsgtNY+HEd3p1q0OjC5U1/Lxo0k2HtPt1Llvko1L0LAwOZ7HYm+6dbTZtePrHJ7tQ8x1KjMw29uz2r+zzN3txoA3c8HGzjxtV7eCSniPPb7P92UUc3jfxxukhjmeagtEhz6Ck8nzfzf2WRRld4wmBiFU6mRtEwW7P6LdJEwwe4shPLPc0aV+ERqvCZiAluufCShRndTIydSWspx1JoSeZwGHdzSUY3gWonU6+nJ7rPhE15I2NP/jTrvFZoxLOGE/xUT53H1b+qEb/Rx15SZuyWC7+nTXA8WviZhBZ7DjM8mTfBNk2c3pTH4WSzuY2l7mcaBv5PWXYSbOAVp4d3uqxWhu91a+TE+k/mj/6p5hq++62Su5z87PAT2Au/p42dVTKTsp9dbMszh8JH2fDdLBzCch7DR08sPCjVZKdaxr890bhKrZZxTczohplJlzlMw/QKzWcs9Xp6Yg7sbQdiXBMzumFm0mUO0zC9QnMbyzKeaQAAJrB0ZxoAgMmIBgAgIhoAgMj/AafOR5ztYuGeAAAAAElFTkSuQmCC"
-height="200"
-width="700"/>
-<br/>
-<br/>
-<table style="border-collapse:collapse; margin-left: 5px">
-<thead style="background-color: rgb(228,226,215); color: rgb(37,87,146); font-size: 11pt;">
-<th style="padding: 6px 0;">
-&nbsp;Day of the week&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Visits&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions per Visit&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Avg. Time on Website&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Bounce Rate&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Conversion Rate&nbsp;&nbsp;
-</th>
-</thead>
-<tbody>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Monday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:06:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Tuesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:15:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Wednesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Thursday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Friday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Saturday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Sunday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-100%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-</tbody>
-</table>
-<br/>
-<a style="text-decoration:none; color: rgb(126,115,99); font-size: 9pt" href="#reportTop">
-Back to top
-</a><a name="Actions_get"/>
+There is no data for this report.<a name="Actions_get"/>
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Actions - Main metrics
 </h2>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
index 1abca8b9f385998d34b26251a3b57dda1543b6ea..ebc947ff38509cf955649bca93627a64d90995c8 100644
--- a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
+++ b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__PDFReports.generateReport_month.original.html
@@ -1620,198 +1620,7 @@ Back to top
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Visits by Day of Week
 </h2>
-<table style="border-collapse:collapse; margin-left: 5px">
-<thead style="background-color: rgb(228,226,215); color: rgb(37,87,146); font-size: 11pt;">
-<th style="padding: 6px 0;">
-&nbsp;Day of the week&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Visits&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions per Visit&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Avg. Time on Website&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Bounce Rate&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Conversion Rate&nbsp;&nbsp;
-</th>
-</thead>
-<tbody>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Monday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:06:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Tuesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:15:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Wednesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Thursday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Friday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Saturday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Sunday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-100%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-</tbody>
-</table>
-<br/>
-<a style="text-decoration:none; color: rgb(126,115,99); font-size: 9pt" href="#reportTop">
-Back to top
-</a><a name="Actions_get"/>
+There is no data for this report.<a name="Actions_get"/>
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Actions - Main metrics
 </h2>
diff --git a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf
index 3cc8a3fbd057b1d37249e64afc7be04387f0c925..190016aa7fb8cf40b2340f1db4fe2a87e7bacec5 100644
Binary files a/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf and b/tests/PHPUnit/Integration/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_month.original.pdf differ
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems__VisitTime.getByDayOfWeek_day.xml b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems__VisitTime.getByDayOfWeek_day.xml
index e9de54454b39bb2b5e7a8ca0e97a77f5a6d25d66..0f224cb46e2d867d14dee9249526cfe6c73c0a2c 100755
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems__VisitTime.getByDayOfWeek_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems__VisitTime.getByDayOfWeek_day.xml
@@ -7,12 +7,7 @@
 	</row>
 	<row>
 		<label>Tuesday</label>
-		<nb_visits>3</nb_visits>
-		<nb_uniq_visitors>1</nb_uniq_visitors>
-		<nb_actions>13</nb_actions>
-		<sum_visit_length>5403</sum_visit_length>
-		<bounce_count>0</bounce_count>
-		<nb_visits_converted>2</nb_visits_converted>
+		<nb_visits>0</nb_visits>
 		<day_of_week>2</day_of_week>
 	</row>
 	<row>
@@ -22,7 +17,12 @@
 	</row>
 	<row>
 		<label>Thursday</label>
-		<nb_visits>0</nb_visits>
+		<nb_visits>3</nb_visits>
+		<nb_uniq_visitors>1</nb_uniq_visitors>
+		<nb_actions>13</nb_actions>
+		<sum_visit_length>5403</sum_visit_length>
+		<bounce_count>0</bounce_count>
+		<nb_visits_converted>2</nb_visits_converted>
 		<day_of_week>4</day_of_week>
 	</row>
 	<row>
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_week.original.html b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_week.original.html
index 3ea13e548d50bd71558e0aec72b1ab681489ab52..2aec4e385fe217c50d6a9b59b139e1c4d27ca96e 100644
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_week.original.html
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_and_graph__PDFReports.generateReport_week.original.html
@@ -1708,205 +1708,7 @@ Back to top
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Visits by Day of Week
 </h2>
-<img
-alt=""
-src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAADICAIAAACF9KXqAAAJfklEQVR4nO3dz2scfR0H8KlPmrS1aWkObUOpQTYSWy0ItXoRwefizQcR/Qc8qODJoycP8njQv0DQi+DBix4ED4KnB0EqIoK1YNcSa1JTNbVPats8LYmHfdidzs7MfrK72fmxr9dpf8xOPvPhu7PvfGd29sTh4WECADDKB6ouAABoBqEBAAgRGgCAEKEBAAgRGgCAEKEBAAgRGgCAEKEBAAiZdWjodDq5D+Y+Xv4qAGCWFqa7urd/9PvMI9/+6icjL+x2u/FnO51O+fIAwNRNOTT89cG7L1++7N89efLk1tbWlStX+o90u93MR74EAACNMOXQkCTJs2fP+rfPnz+/vb2dDg1FhpNE/3YmZ/Se6i/Qeza98GTlAwD5ph8aJlcSIJK8DGHeAgBmoIJvT6TnBiKf8UcKARIDAByT6c80nDlzZsI19FNFJAEcaWEAYGxTDg1ffLOzvbU1+Xp6CSCYBo60MAAwnimHhi98di1J1kYuFpweSKeByDoT5zQAwLGp4xUhj3QpJ9d9AoDZqOO3J4a/RZn7BYqihWdTJADMmxOHh4dV1wAANEAdD08AADUkNAAAIUIDABAiNAAAIUIDABAiNAAAIUIDABCSHxpcZhEAyMgJDRIDADAsGxr84BMAkOu1357ITQxbr//U9c7OzuXLl4+9LgCgZgYzDeYYAIASgx+sGj6VQYYAAPryf+XSrAMAkOE6DQBAiNAAAITkH54AAMgw0wAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhAgNAECI0AAAhCxUXcBc+M3vNqsuoRbe/PRa1SUAMD6h4dh98+1fb//radVV1ILQANBoDk8AACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACFCAwAQIjQAACEL6TudTqd/u9vtzrwYAKC+BqGh0+mkg0LmLgAw5waHJ0QEAKDEwsglnjx5kr779OnTc+fOHVs9LXRwcFB1CXWxt7dX9NRf7u/OspI6u/bhlapLAMiXHxrSxya2t7fTT92/fz996gMjvXr1quoS6iIzlvr+8+57P/jpvRkXU1vf+/r1qksAyJcNDb1AkD5Uce3atfQCmbuMtLj49yR5r+oqamFjYyP38X/++39JIjS8r6hLAJXLfnvCmQ0AQK7BiZASAwBQovA6DYnvUwAAKYPQICIAACVcRhoACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAIAQoQEACBEaAICQhfSdTqfTv93tdmdeDABQX4PQ0Ol00kEhcxcAmHMOTwAAIQujFyn241/8qfvgv9MqpdE+9fHVtz73kaqroM1+9c7f3vnDP6quohY+tHrua1/+RO5T3/3hb5883Z9xPfX0lc9/9NbHVnOf+tK3fj7jYmrrZ99/6403cv55/uPdnZ/88s+zr6eGlj+4+J1vfKZ/98Th4WHvVtHhidu3b6dff/fu3evXr8+k1JD9/f0HDx6sr69XXUit7e7u7u/vr67m70Ho2dzcXFlZWV5errqQWrtz506t9gA1tLe3t7u7u7a2VnUhtfbw4cOlpaWVlZWqC6m1e/fuXb16dWlpqepCBkbPNNy6davkbuWeP3++vLx848aNqguptZ2dnRcvXtiLlTt79uzFixcvXLhQdSG1dnBwcPPmzaqrqLXHjx8/evRoY2Oj6kJqbXNz89SpU5cuXaq6kFpbXFxcX18/ffp01YUMOKcBAAgRGgCAkMHhiW636zoNAECR185pEBQAgCKDb08AAJRwTgMAENLO0JA+OYNyc9irKW5y07t3HPU3vSfTog+T0L1cdWjLRFeEnJZeIzKXlkqcY5GSO1bmsz/lP5LiN1OK1GF301CZ1mUG2HwOuchZ8/PZmSKt+Z5BLUIDI/UHmfch48kdQpJEUMmbbg7fj5L6UbWpY3UJDb0vfPb62LvR351lAlrm2ZLdX+4ybfr0LRqIw5E204rcj4qmtCt3qOSOnGTU8BgeSCNbV7Sq4WVq2Loi6fpzB9Vwn/vLZ9ZQtNqkaT0pl9uWZP760FOykxkeKslRutf0d1aRkW+0/mJJ/QZVXUJDkeHOJnkNyl2sBWNrDOWtKFogaUu7St6K6QeHFw4eI2vfSAtOPGSSWdEaktaNqCL6kJHZzNyUmVHyUdeCd9Z4IjulpNLONPJEyLF71A9x8zMEJ9H6dh3fRjWodcHyJt+KBvVkWCel98g874V6m5BpyHjrGe9PJ03rXrxj423ULNtSo5mG/mZPa5snGc2NltnwYGMb167+2yMyRRxfZ/puW1s3ifj7tE1tmWSn1KY+9OXO5039r7SpdbkTBmOrsDM1Cg3TNa1PkSYa3sEVTSz3NatduXuo3CMRY6w595HWtG4qRvYkmcu25JqTPhzHZs5J68ZQbWfqdXiidyRswpWMnPxp1rxWUMlRwzFe1VfndqWrKvlEH/lIkZFLtn6kjbE/an1PgtrdhylO5o2xTBO7N+F+OLLYzNpS95mGzP+URZNgmTNOj2+6rFaGtzop7Vh6Mr/8Vc01vPlJwSZHXjt8ALv1I21kryI9KXptu81PH3LfZcObmduE+dyHl3csuFOqyaCax9+eaFxKrZZ2jU3rhulJjz5MQvdyzaYt9To8MQNG25Fo19i0bpie9OjDJHQv18zaMo8zDQDAGOZupgEAGI/QAACECA0AQMj/AYrRh8ZhlwO4AAAAAElFTkSuQmCC"
-height="200"
-width="700"/>
-<br/>
-<br/>
-<table style="border-collapse:collapse; margin-left: 5px">
-<thead style="background-color: rgb(228,226,215); color: rgb(37,87,146); font-size: 11pt;">
-<th style="padding: 6px 0;">
-&nbsp;Day of the week&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Visits&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions per Visit&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Avg. Time on Website&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Bounce Rate&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Conversion Rate&nbsp;&nbsp;
-</th>
-</thead>
-<tbody>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Monday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Tuesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-3
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-13
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-4.33
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:30:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-66.67%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Wednesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-3
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1.5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:12:02
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-50%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-100%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Thursday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Friday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Saturday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Sunday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-</tbody>
-</table>
-<br/>
-<a style="text-decoration:none; color: rgb(126,115,99); font-size: 9pt" href="#reportTop">
-Back to top
-</a><a name="Goals_get_idGoal--ecommerceOrder"/>
+There is no data for this report.<a name="Goals_get_idGoal--ecommerceOrder"/>
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Ecommerce Orders
 </h2>
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
index c4e10f7ff62f10a9332565041e92f35f0fca56fa..d8f85ebc9d26d5f2b54602de688967257d1e14f5 100644
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__PDFReports.generateReport_week.original.html
@@ -1680,198 +1680,7 @@ Back to top
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Visits by Day of Week
 </h2>
-<table style="border-collapse:collapse; margin-left: 5px">
-<thead style="background-color: rgb(228,226,215); color: rgb(37,87,146); font-size: 11pt;">
-<th style="padding: 6px 0;">
-&nbsp;Day of the week&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Visits&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Actions per Visit&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Avg. Time on Website&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Bounce Rate&nbsp;&nbsp;
-</th>
-<th style="padding: 6px 0;">
-&nbsp;Conversion Rate&nbsp;&nbsp;
-</th>
-</thead>
-<tbody>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Monday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Tuesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-3
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-13
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-4.33
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:30:01
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-66.67%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Wednesday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-2
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-3
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-1.5
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:12:02
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-50%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-100%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Thursday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Friday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="background-color: rgb(249,250,250)">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Saturday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-<tr style="">
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-Sunday
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-00:00:00
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-<td style="font-size: 11pt; border-bottom: 1px solid rgb(231,231,231); padding: 5px 0 5px 5px;">
-0%
-</td>
-</tr>
-</tbody>
-</table>
-<br/>
-<a style="text-decoration:none; color: rgb(126,115,99); font-size: 9pt" href="#reportTop">
-Back to top
-</a><a name="Goals_get_idGoal--ecommerceOrder"/>
+There is no data for this report.<a name="Goals_get_idGoal--ecommerceOrder"/>
 <h2 style="color: rgb(126,115,99); font-size: 11pt;">
 Ecommerce Orders
 </h2>
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf
index ba1c591b34319ddf4acf76d02c886b90f77c9ccf..9c560a5fdb1769af280c5deb3c4cdc09c684a80c 100644
Binary files a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf and b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__PDFReports.generateReport_week.original.pdf differ
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_all_sites__PDFReports.generateReport_week.original.sms.txt b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_all_sites__PDFReports.generateReport_week.original.sms.txt
index a421c77027cddd85500cda99036df0e01786d020..22063e7354fbc9b16511bd2baf060f154a5b971c 100644
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_all_sites__PDFReports.generateReport_week.original.sms.txt
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_all_sites__PDFReports.generateReport_week.original.sms.txt
@@ -1 +1 @@
-Week 4 April - 10 April 2011. Piwik test: 5 Visits (+100%), 16 Actions (+100%), Revenue: $ 13361 (+100%), 5 Goal conversions (+100%), Product Revenue: $ 13351 (+100%), 4 Ecommerce Orders (+100%). Piwik test: 1 Visits (+100%), 0 Actions, Revenue: $ 250 (+100%), 1 Goal conversions (+100%)
\ No newline at end of file
+Week 4 April - 10 April 2011. Piwik test: 5 Visits, 16 Actions, Revenue: $ 13361, 5 Goal conversions, Product Revenue: $ 13351, 4 Ecommerce Orders. Piwik test: 1 Visits, 0 Actions, Revenue: $ 250, 1 Goal conversions
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_one_site__PDFReports.generateReport_week.original.sms.txt b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_one_site__PDFReports.generateReport_week.original.sms.txt
index fa6a9d691ea6b4ae9c1724a39cc036516e83ff00..e84eb14972ebe52a61096c914359c52eabb3d225 100644
--- a/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_one_site__PDFReports.generateReport_week.original.sms.txt
+++ b/tests/PHPUnit/Integration/expected/test_ecommerceOrderWithItems_scheduled_report_via_sms_one_site__PDFReports.generateReport_week.original.sms.txt
@@ -1 +1 @@
-Week 4 April - 10 April 2011. 5 Visits (+100%), 16 Actions (+100%), Revenue: $ 13361 (+100%), 5 Goal conversions (+100%), Product Revenue: $ 13351 (+100%), 4 Ecommerce Orders (+100%)
\ No newline at end of file
+Week 4 April - 10 April 2011. 5 Visits, 16 Actions, Revenue: $ 13361, 5 Goal conversions, Product Revenue: $ 13351, 4 Ecommerce Orders
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_day.xml
index c234bed59e963e268d7a9bc05348d941758c4aa9..106f23f16bb7dddc98ac7def1dd2c59d64a48127 100755
--- a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_day.xml
@@ -1,2 +1,10 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<result />
\ No newline at end of file
+<results>
+	<result date="2009-01-04" />
+	<result date="2009-01-05" />
+	<result date="2009-01-06" />
+	<result date="2009-01-07" />
+	<result date="2009-01-08" />
+	<result date="2009-01-09" />
+	<result date="2009-01-10" />
+</results>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_week.xml b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_week.xml
index c234bed59e963e268d7a9bc05348d941758c4aa9..5cfb246edc18a6da402cb45044dfaf1ad20e25bc 100755
--- a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_week.xml
+++ b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__MultiSites.getAll_week.xml
@@ -1,2 +1,10 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<result />
\ No newline at end of file
+<results>
+	<result date="From 2008-12-29 to 2009-01-04" />
+	<result date="From 2009-01-05 to 2009-01-11" />
+	<result date="From 2009-01-12 to 2009-01-18" />
+	<result date="From 2009-01-19 to 2009-01-25" />
+	<result date="From 2009-01-26 to 2009-02-01" />
+	<result date="From 2009-02-02 to 2009-02-08" />
+	<result date="From 2009-02-09 to 2009-02-15" />
+</results>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_day.xml b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_day.xml
index 46ae2db0a42f5f40787ec48dae6973e19d1d50fa..6dab91a7f442f0a1d44579dbee158ec7d471009f 100755
--- a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_day.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <result>
-	<error message="VisitTime.getByDayOfWeek does not support multiple dates.
+	<error message="getByDayOfWeek not working yet
  
  --&gt; To temporarily debug this error further, set $SHOW_ME_BACKTRACE=true; in ResponseBuilder.php" />
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_week.xml b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_week.xml
index 46ae2db0a42f5f40787ec48dae6973e19d1d50fa..6dab91a7f442f0a1d44579dbee158ec7d471009f 100755
--- a/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_week.xml
+++ b/tests/PHPUnit/Integration/expected/test_noVisit_PeriodIsLast__VisitTime.getByDayOfWeek_week.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <result>
-	<error message="VisitTime.getByDayOfWeek does not support multiple dates.
+	<error message="getByDayOfWeek not working yet
  
  --&gt; To temporarily debug this error further, set $SHOW_ME_BACKTRACE=true; in ResponseBuilder.php" />
 </result>
\ No newline at end of file
diff --git a/tests/PHPUnit/Integration/expected/test_oneVisitor_oneWebsite_severalDays_DateRange_IndexedByDate__MultiSites.getAll_day.xml b/tests/PHPUnit/Integration/expected/test_oneVisitor_oneWebsite_severalDays_DateRange_IndexedByDate__MultiSites.getAll_day.xml
index 6cba58af76b07f209e3fa4807961a2ae5cb52e0d..fc198901aced51697b0ea768e404a6126f1ccfab 100755
--- a/tests/PHPUnit/Integration/expected/test_oneVisitor_oneWebsite_severalDays_DateRange_IndexedByDate__MultiSites.getAll_day.xml
+++ b/tests/PHPUnit/Integration/expected/test_oneVisitor_oneWebsite_severalDays_DateRange_IndexedByDate__MultiSites.getAll_day.xml
@@ -1,15 +1,8 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <result>
-	<row>
-		<label>Site AAAAAA</label>
-		<nb_visits>2</nb_visits>
-		<nb_actions>3</nb_actions>
-		<nb_pageviews>3</nb_pageviews>
-		<revenue>0</revenue>
-		<visits_evolution>0%</visits_evolution>
-		<actions_evolution>0%</actions_evolution>
-		<pageviews_evolution>0%</pageviews_evolution>
-		<revenue_evolution>0%</revenue_evolution>
-		<idsite>1</idsite>
-	</row>
+	<nb_visits>2</nb_visits>
+	<nb_actions>3</nb_actions>
+	<label>Site AAAAAA</label>
+	<nb_pageviews>3</nb_pageviews>
+	<revenue>0</revenue>
 </result>
\ No newline at end of file