Piwik\Plugins\SitesManager\SitesManager::getTrackerExcludedQueryParameters PHP Method

getTrackerExcludedQueryParameters() public static method

Returns the array of URL query parameters to exclude from URLs
public static getTrackerExcludedQueryParameters ( array $website ) : array
$website array
return array
    public static function getTrackerExcludedQueryParameters($website)
    {
        $excludedQueryParameters = $website['excluded_parameters'];
        $globalExcludedQueryParameters = API::getInstance()->getExcludedQueryParametersGlobal();
        $excludedQueryParameters .= ',' . $globalExcludedQueryParameters;
        return self::filterBlankFromCommaSepList($excludedQueryParameters);
    }

Usage Example

Esempio n. 1
0
 /**
  * Get excluded query parameters for a site.
  * This information is used for client side url normalization.
  */
 public function getExcludedQueryParameters($idSite)
 {
     $this->authenticate($idSite);
     $sitesManager = APISitesManager::getInstance();
     $site = $sitesManager->getSiteFromId($idSite);
     try {
         return SitesManager::getTrackerExcludedQueryParameters($site);
     } catch (Exception $e) {
         // an exception is thrown when the user has no view access.
         // do not throw the exception to the outside.
         return array();
     }
 }