diff options
author | mattab <matthieu.aubry@gmail.com> | 2016-03-31 07:27:21 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2016-03-31 07:27:21 +0300 |
commit | 283e0499f8370c4c289dfdab6d39d7abb568a647 (patch) | |
tree | 3d35013c9ae57c125153b8c53b978132caa86a4f /core | |
parent | c928ff499504e319bb1b43e5abf2ae84484169e5 (diff) |
URL query string parameters to remove from URL are now stored in config file
Diffstat (limited to 'core')
-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. * |