コード例 #1
0
 public function aggregateDayReport()
 {
     $this->dataArray = new DataArray();
     for ($i = 1; $i <= Tracker::MAX_CUSTOM_VARIABLES; $i++) {
         $this->aggregateCustomVariable($i);
     }
     $this->removeVisitsMetricsFromActionsAggregate();
     $this->dataArray->enrichMetricsWithConversions();
     $table = $this->dataArray->asDataTable();
     $blob = $table->getSerialized($this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $columnToSort = Metrics::INDEX_NB_VISITS);
     $this->getProcessor()->insertBlobRecord(self::CUSTOM_VARIABLE_RECORD_NAME, $blob);
 }
コード例 #2
0
ファイル: Archiver.php プロジェクト: diosmosis/piwik
 public function aggregateDayReport()
 {
     $this->dataArray = new DataArray();
     $maxCustomVariables = CustomVariables::getNumUsableCustomVariables();
     for ($i = 1; $i <= $maxCustomVariables; $i++) {
         $this->aggregateCustomVariable($i);
     }
     $this->removeVisitsMetricsFromActionsAggregate();
     $this->dataArray->enrichMetricsWithConversions();
     $table = $this->dataArray->asDataTable();
     foreach ($table->getRows() as $row) {
         $label = $row->getColumn('label');
         if (!empty($this->metadata[$label])) {
             foreach ($this->metadata[$label] as $name => $value) {
                 $row->addMetadata($name, $value);
             }
         }
     }
     $blob = $table->getSerialized($this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $columnToSort = Metrics::INDEX_NB_VISITS);
     $this->getProcessor()->insertBlobRecord(self::CUSTOM_VARIABLE_RECORD_NAME, $blob);
 }