当前位置: 首页>>代码示例>>PHP>>正文


PHP owa_coreAPI::getSiteSetting方法代码示例

本文整理汇总了PHP中owa_coreAPI::getSiteSetting方法的典型用法代码示例。如果您正苦于以下问题:PHP owa_coreAPI::getSiteSetting方法的具体用法?PHP owa_coreAPI::getSiteSetting怎么用?PHP owa_coreAPI::getSiteSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在owa_coreAPI的用法示例。


在下文中一共展示了owa_coreAPI::getSiteSetting方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loadGoals

 function loadGoals($site_id)
 {
     $this->goals = array();
     for ($i = 1; $i <= $this->numGoals; $i++) {
         $this->goals[$i] = array('goal_number' => '', 'goal_name' => '', 'goal_group' => '', 'goal_status' => '', 'goal_type' => '');
     }
     $from_db = owa_coreAPI::getSiteSetting($site_id, 'goals');
     if ($from_db) {
         foreach ($from_db as $k => $goal) {
             if (array_key_exists($k, $this->goals)) {
                 // add to goal array
                 $this->goals[$k] = $goal;
                 // set active goal lists
                 if (array_key_exists('goal_status', $goal) && $goal['goal_status'] === 'active') {
                     // set active goals
                     $this->activeGoals[] = $goal['goal_number'];
                     // set active goal groups
                     if (array_key_exists('goal_group', $goal)) {
                         $this->activeGoalGroups[$goal['goal_group']] = $goal['goal_group'];
                         // set active goals by group
                         $this->activeGoalsByGroup[$goal['goal_group']][] = $goal['goal_number'];
                     }
                 }
             }
         }
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:27,代码来源:goalManager.php

示例2: action

 function action()
 {
     // action counts
     $params = array('period' => $this->get('period'), 'startDate' => $this->get('startDate'), 'endDate' => $this->get('endDate'), 'metrics' => 'actions', 'dimensions' => 'actionName', 'siteId' => $this->getParam('siteId'), 'do' => 'getResultSet');
     $rs = owa_coreAPI::executeApiCommand($params);
     //print_r($rs);
     $this->set('actions', $rs);
     $rs = owa_coreAPI::executeApiCommand(array('do' => 'getLatestVisits', 'siteId' => $this->getParam('siteId'), 'page' => $this->getParam('page'), 'startDate' => $this->getParam('startDate'), 'endDate' => $this->getParam('endDate'), 'period' => $this->getParam('period'), 'resultsPerPage' => 10));
     $this->set('latest_visits', $rs);
     // set view stuff
     $this->setSubview('base.reportDashboard');
     $this->setTitle('Dashboard');
     $metrics = 'visits,uniqueVisitors,pageViews,bounceRate,pagesPerVisit,visitDuration';
     if (owa_coreAPI::getSiteSetting($this->getParam('siteId'), 'enableEcommerceReporting')) {
         $metrics .= ',transactions,transactionRevenue';
     }
     $this->set('metrics', $metrics);
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:18,代码来源:reportDashboard.php

示例3: pre

 /**
  * Pre Action
  * Current user is fully authenticated and loaded by this point
  *
  */
 function pre()
 {
     $sites = $this->getSitesAllowedForCurrentUser();
     $this->set('sites', $sites);
     $this->set('currentSiteId', $this->getParam('siteId'));
     // pass full set of params to view
     $this->data['params'] = $this->params;
     // set default period if necessary
     if (!$this->getParam('period') && !$this->getParam('startDate')) {
         $this->set('is_default_period', true);
         $period = 'last_seven_days';
         $this->params['period'] = $period;
     } elseif (!$this->getParam('period') && $this->getParam('startDate')) {
         $period = 'date_range';
         $this->params['period'] = $period;
     } else {
         $period = $this->getParam('period');
     }
     $this->setPeriod($period);
     $this->setView('base.report');
     $this->setViewMethod('delegate');
     $this->dom_id = str_replace('.', '-', $this->getParam('do'));
     $this->data['dom_id'] = $this->dom_id;
     $this->data['do'] = $this->getParam('do');
     $nav = owa_coreAPI::getGroupNavigation('Reports');
     // setup tabs
     $siteId = $this->get('siteId');
     if ($siteId) {
         $gm = owa_coreAPI::supportClassFactory('base', 'goalManager', $siteId);
         $tabs = array();
         $site_usage = array('tab_label' => 'Site Usage', 'metrics' => 'visits,pagesPerVisit,visitDuration,bounceRate,uniqueVisitors', 'sort' => 'visits-', 'trendchartmetric' => 'visits');
         $tabs['site_usage'] = $site_usage;
         // ecommerce tab
         if (owa_coreAPI::getSiteSetting($this->getParam('siteId'), 'enableEcommerceReporting')) {
             $ecommerce = array('tab_label' => 'e-commerce', 'metrics' => 'visits,transactions,transactionRevenue,revenuePerVisit,revenuePerTransaction,ecommerceConversionRate', 'sort' => 'transactionRevenue-', 'trendchartmetric' => 'transactions');
             $tabs['ecommerce'] = $ecommerce;
         }
         $goal_groups = $gm->getActiveGoalGroups();
         if ($goal_groups) {
             foreach ($goal_groups as $group) {
                 $goal_metrics = 'visits';
                 $active_goals = $gm->getActiveGoalsByGroup($group);
                 if ($active_goals) {
                     foreach ($active_goals as $goal) {
                         $goal_metrics .= sprintf(',goal%sCompletions', $goal);
                     }
                 }
                 $goal_metrics .= ',goalValueAll';
                 $goal_group = array('tab_label' => $gm->getGoalGroupLabel($group), 'metrics' => $goal_metrics, 'sort' => 'goalValueAll-', 'trendchartmetric' => 'visits');
                 $name = 'goal_group_' . $group;
                 $tabs[$name] = $goal_group;
             }
         }
         $this->set('tabs', $tabs);
         $this->set('tabs_json', json_encode($tabs));
         if (!owa_coreAPI::getSiteSetting($this->getParam('siteId'), 'enableEcommerceReporting')) {
             unset($nav['Ecommerce']);
         }
     }
     //$this->body->set('sub_nav', owa_coreAPI::getNavigation($this->get('nav_tab'), 'sub_nav'));
     $this->set('top_level_report_nav', $nav);
 }
开发者ID:rgaviras,项目名称:Open-Web-Analytics,代码行数:67,代码来源:owa_reportController.php

示例4: makeUrlCanonical

 /**
  * Filter function Strips a URL of certain defined session or tracking params
  *
  * @return string
  */
 function makeUrlCanonical($url, $site_id = '')
 {
     owa_coreAPI::debug('makeUrlCanonical using site_id: ' . $site_id);
     //remove anchors
     $pos = strpos($url, '#');
     if ($pos) {
         $url = substr($url, 0, $pos);
     }
     $filter_string = owa_coreAPI::getSiteSetting($site_id, 'query_string_filters');
     if ($filter_string) {
         $filters = str_replace(' ', '', $filter_string);
         $filters = explode(',', $filter_string);
     } else {
         $filters = array();
     }
     // merge global filters
     $global_filters = owa_coreAPI::getSetting('base', 'query_string_filters');
     if ($global_filters) {
         $global_filters = str_replace(' ', '', $global_filters);
         $global_filters = explode(',', $global_filters);
         $filters = array_merge($global_filters, $filters);
     }
     // OWA specific params to filter
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'source');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'medium');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'campaign');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'ad');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'ad_type');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'overlay');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . 'state');
     array_push($filters, owa_coreAPI::getSetting('base', 'ns') . owa_coreAPI::getSetting('base', 'feed_subscription_param'));
     //print_r($filters);
     foreach ($filters as $filter => $value) {
         $url = preg_replace('#\\?' . $value . '=.*$|&' . $value . '=.*$|' . $value . '=.*&#msiU', '', $url);
     }
     //check for dangling '?'. this might occure if all params are stripped.
     // returns last character of string
     $test = substr($url, -1);
     // if dangling '?' is found clean up the url by removing it.
     if ($test == '?') {
         $url = substr($url, 0, -1);
     }
     //check and remove default page
     $default_page = owa_coreAPI::getSiteSetting($site_id, 'default_page');
     if ($default_page) {
         $default_length = strlen($default_page);
         if ($default_length) {
             //test for string
             $default_test = substr($url, 0 - $default_length, $default_length);
             if ($default_test === $default_page) {
                 $url = substr($url, 0, 0 - $default_length);
             }
         }
     }
     // check and remove trailing slash
     if (substr($url, -1) === '/') {
         $url = substr($url, 0, -1);
     }
     return $url;
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:65,代码来源:module.php


注:本文中的owa_coreAPI::getSiteSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。