8.3 Customizing the Instrumentation Script

The End-User Experience component of Experience Manager uses the urlLocation alarm property to generate element structures under the monitor’s hierarchy. Each element represents an individual page that is accessed by a user or a group of users.

By default, the urlLocation property contains the fully qualified URL, excluding any Post or Get parameters that are passed with the URL. By excluding ‘?’ characters and long parameter strings, represented elements in the hierarchy can be easier to read and understand.

Configure the JavaScript file for the unique requirements of your application to:

  • Capture specific parameters to differentiate users who access programmable pages that output data based on the parameters passed:

    protocol://host:port/file_structure?and=parameters
    
    http://escrow.mosol.com:80/getProperties?dname=abc&document=true
    
  • Pass a unique session ID in the parameter list to identify every request a user makes as unique, when a Web-based application uses the same dynamic URL to generate various types of content.

    For example, an application uses the following to create new records in a system:

    http://escrow.mosol.com:80/doAction?action=create&foo=bar
    

    And uses a different URL to update records in the same system:

    http://escrow.mosol.com:80/doAction?action=update&foo=bar
    

To customize a JavaScript instrumentation file:

  1. After generating the JavaScript file from (Monitor Configuration > Export > End User Javascript), open the JavaScript file in a text editor.

    For more information, see Step 1.

  2. Modify one or more of the following parameters to determine the values captured in the Operations Center alarm’s urlLocation property:

    • includeParamsInUrl: Specify the parameter information to capture from the document.location.href value.

      Valid settings are (must be lowercase):

      • none: The urlLocation value won’t include any parameter information.

      • all: The urlLocation value includes all parameters.

      • list: The urlLocation value includes (or excludes) only the parameters listed as determined by the includeExcludeParamList) setting.

      Defaults to none; no parameter information is captured.

    • segmentedParamList: Specify specific parameters to capture or exclude when includeParamsInUrl="list". This list must be lowercase and comma delimited. Do not use any ending or trailing commas.

      Defaults to empty. No parameter information is included when includeExcludeParamList="include". In contrast, all parameters are included if includeExcludeParamList="exclude".

    • includeExcludeParamList Indicate if the parameters listed (specified in includeExcludeParamList) are captured or excluded. Valid values are include or exclude. Defaults to empty.

    For example, if we set:

    includeParamsInUrl="list"
    segmentedParamList="paramName1,paramName2,paramName3"
    includeExcludeParamList="include"
    

    where paramName instances are the names of parameters as found in the URL.

    With the above settings, the instrumentation file parses all dynamic page executions (where the URL is appended with parameters), and records only the paramName1, paramName2, and paramName3 parameters in the Operations Center alarm’s urlLocation property.

    The resulting urlLocation value based on this example is displayed as:

    http://escrow/.mosol.com/action (paramName=value)(paramName1=value)(paramName3=value)
    

    Alternatively, we can set includeExcludeParamList="exclude" to capture all parameters except than those as defined in segmentedParamList.