當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Common::getCampaignParameters方法代碼示例

本文整理匯總了PHP中Piwik\Common::getCampaignParameters方法的典型用法代碼示例。如果您正苦於以下問題:PHP Common::getCampaignParameters方法的具體用法?PHP Common::getCampaignParameters怎麽用?PHP Common::getCampaignParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Common的用法示例。


在下文中一共展示了Common::getCampaignParameters方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getQueryParametersToExclude

 /**
  * Returns the array of parameters names that must be excluded from the Query String in all tracked URLs
  * @static
  * @param $idSite
  * @return array
  */
 public static function getQueryParametersToExclude($idSite)
 {
     $campaignTrackingParameters = Common::getCampaignParameters();
     $campaignTrackingParameters = array_merge($campaignTrackingParameters[0], $campaignTrackingParameters[1]);
     $website = Cache::getCacheWebsiteAttributes($idSite);
     $excludedParameters = self::getExcludedParametersFromWebsite($website);
     if (!empty($excludedParameters)) {
         Common::printDebug('Excluding parameters "' . implode(',', $excludedParameters) . '" from URL');
     }
     $parametersToExclude = array_merge($excludedParameters, self::$queryParametersToExclude, $campaignTrackingParameters);
     $parametersToExclude = array_map('strtolower', $parametersToExclude);
     return $parametersToExclude;
 }
開發者ID:TensorWrenchOSS,項目名稱:piwik,代碼行數:19,代碼來源:PageUrl.php

示例2: getQueryParametersToExclude

 /**
  * Returns the array of parameters names that must be excluded from the Query String in all tracked URLs
  * @static
  * @param $idSite
  * @return array
  */
 public static function getQueryParametersToExclude($idSite)
 {
     $campaignTrackingParameters = Common::getCampaignParameters();
     $campaignTrackingParameters = array_merge($campaignTrackingParameters[0], $campaignTrackingParameters[1]);
     $website = Cache::getCacheWebsiteAttributes($idSite);
     $excludedParameters = self::getExcludedParametersFromWebsite($website);
     $parametersToExclude = array_merge($excludedParameters, self::$queryParametersToExclude, $campaignTrackingParameters);
     /**
      * Triggered before setting the action url in Piwik\Tracker\Action so plugins can register
      * parameters to be excluded from the tracking URL (e.g. campaign parameters).
      *
      * @param array &$parametersToExclude An array of parameters to exclude from the tracking url.
      */
     Piwik::postEvent('Tracker.PageUrl.getQueryParametersToExclude', array(&$parametersToExclude));
     if (!empty($parametersToExclude)) {
         Common::printDebug('Excluding parameters "' . implode(',', $parametersToExclude) . '" from URL');
     }
     $parametersToExclude = array_map('strtolower', $parametersToExclude);
     return $parametersToExclude;
 }
開發者ID:bossrabbit,項目名稱:piwik,代碼行數:26,代碼來源:PageUrl.php

示例3: detectReferrerCampaignFromLandingUrl

 protected function detectReferrerCampaignFromLandingUrl()
 {
     if (!isset($this->currentUrlParse['query']) && !isset($this->currentUrlParse['fragment'])) {
         return false;
     }
     $campaignParameters = Common::getCampaignParameters();
     $this->campaignNames = $campaignParameters[0];
     $this->campaignKeywords = $campaignParameters[1];
     $found = false;
     // 1) Detect campaign from query string
     if (isset($this->currentUrlParse['query'])) {
         $found = $this->detectCampaignFromString($this->currentUrlParse['query']);
     }
     // 2) Detect from fragment #hash
     if (!$found && isset($this->currentUrlParse['fragment'])) {
         $this->detectCampaignFromString($this->currentUrlParse['fragment']);
     }
 }
開發者ID:diosmosis,項目名稱:piwik,代碼行數:18,代碼來源:Base.php


注:本文中的Piwik\Common::getCampaignParameters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。