By default, we capture URLs with their query strings. Because query strings may result in very long URLs or contain information that you don't want to expose, you may want to prevent all or parts of the query string from being displayed in the Controller UI.

You can do this by configuring the JavaScript Agent to remove query strings from URLs for the following:

  • pages
  • virtual pages
  • XHR calls
  • referrers
  • scripts
  • resources

Filter for URL Query Strings

The filter filterURLQuery is used to remove query strings from URLs. You can use it to remove all query strings or specific key-value pairs from query strings. The table below specifies the supported values and describes the result of the filter. 

FilterValueDefaultDescription
filterURLQuerytrueNoRemoves query strings from all URLs.
filterURLQuery
falseYesRetains the query strings for all URLs.
filterURLQuery
array of stringsNoEach string represents a key in the query string. The given keys are removed from the query string. Strings that do not match keys in the query string will have no effect on the filtering.

Unsupported values will result in the default behavior of retaining the entire query string for all URLs.

Remove All Query Strings 

The configuration below will remove all URL query strings, so you'll only see the domain name and the URL path in the Controller UI.

<head>
    <script type='text/javascript' charset='UTF-8'>
       (function (config) {  
           config.urlCapture = { 
               filterURLQuery: true
           }
       })(window['adrum-config'] || (window['adrum-config'] = {}));
    </script>
    <script src='//cdn.appdynamics.com/adrum/adrum-latest.js' type='text/javascript' charset='UTF-8'></script>
    ....
</head>
JS

Remove Specific Keys From Query Strings

This configuration will remove the key-value pairs from the query string where the keys match the strings "name", "page", and "id" given in the array.

<head>
    <script type='text/javascript' charset='UTF-8'>
        (function (config) {  
            config.urlCapture = { 
                filterURLQuery: ["name", "page", "id"]
            }
        })(window['adrum-config'] || (window['adrum-config'] = {}));
    </script>
</head>
JS