diff options
Diffstat (limited to 'core/Tracker/PageUrl.php')
-rw-r--r-- | core/Tracker/PageUrl.php | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/core/Tracker/PageUrl.php b/core/Tracker/PageUrl.php index 5083ecdf50..2e5ad45d82 100644 --- a/core/Tracker/PageUrl.php +++ b/core/Tracker/PageUrl.php @@ -28,10 +28,6 @@ class PageUrl 'https://' => 2 ); - protected static $queryParametersToExclude = array('gclid', 'fb_xd_fragment', 'fb_comment_id', - 'phpsessid', 'jsessionid', 'sessionid', 'aspsessionid', - 'doing_wp_cron', 'sid'); - /** * Given the Input URL, will exclude all query parameters set for this site * @@ -87,7 +83,7 @@ class PageUrl $excludedParameters = self::getExcludedParametersFromWebsite($website); $parametersToExclude = array_merge($excludedParameters, - self::$queryParametersToExclude, + self::getUrlParameterNamesToExcludeFromUrl(), $campaignTrackingParameters); /** @@ -107,6 +103,19 @@ class PageUrl } /** + * Returns the list of URL query parameters that should be removed from the tracked URL query string. + * + * @return array + */ + protected static function getUrlParameterNamesToExcludeFromUrl() + { + $paramsToExclude = Config::getInstance()->Tracker['url_query_parameter_to_exclude_from_url']; + $paramsToExclude = explode(",", $paramsToExclude); + $paramsToExclude = array_map('trim', $paramsToExclude); + return $paramsToExclude; + } + + /** * Returns true if URL fragments should be removed for a specific site, * false if otherwise. * |