Exemple #1
0
 protected function getActionsToLookup()
 {
     $actionUrl = false;
     $url = $this->getActionUrl();
     if (!empty($url)) {
         // normalize urls by stripping protocol and www
         $url = Tracker\PageUrl::normalizeUrl($url);
         $actionUrl = array($url['url'], $this->getActionType(), $url['prefixId']);
     }
     return array('idaction_url' => $actionUrl);
 }
 protected function aggregateFromActions($valueField)
 {
     $resultSet = $this->queryCustomDimensionActions($this->dataArray, $valueField);
     while ($row = $resultSet->fetch()) {
         $label = $row[$valueField];
         $label = $this->cleanCustomDimensionValue($label);
         $this->dataArray->sumMetricsActions($label, $row);
         // make sure we always work with normalized URL no matter how the individual action stores it
         $normalized = Tracker\PageUrl::normalizeUrl($row['url']);
         $row['url'] = $normalized['url'];
         $subLabel = $row['url'];
         if (empty($subLabel)) {
             continue;
         }
         $this->dataArray->sumMetricsActionCustomDimensionsPivot($label, $subLabel, $row);
     }
 }
Exemple #3
0
 protected function getUrlAndType()
 {
     $url = $this->getActionUrl();
     if (!empty($url)) {
         // normalize urls by stripping protocol and www
         $url = PageUrl::normalizeUrl($url);
         return array($url['url'], self::TYPE_PAGE_URL, $url['prefixId']);
     }
     return false;
 }