Browser Agent Release Notes

CA Experience Collector consists of the Browser Agent and CA Digital Experience Collector components. The Browser Agent monitors the web application performance in the browsers and provides visibility into the end-user experience. The Browser Agent posts the collected end-user monitoring data to Digital Experience Collector.
dxaxa191
CA Experience Collector consists of the Browser Agent and CA Digital Experience Collector components. The Browser Agent monitors the web application performance in the browsers and provides visibility into the end-user experience. The Browser Agent posts the collected end-user monitoring data to Digital Experience Collector.
This section provides the list of new features or enhancements for Digital Experience Collector or Browser Agent that impact.
Asynchronous Loading of BA.js File is Enabled by Default
The Browser Agent captures metrics using one of the following methods:
  • Async or Safe Mode (Default)
    : In this mode, the web page does not wait for the JavaScript file to download completely but continues to load the resources. While the web page loads, the JavaScript file loads asynchronously and records the metrics without impacting the end-user experience. The JavaScript file records the metrics only after the file is downloaded which usually takes a few milliseconds after the page execution because of the asynchronous loading. Use this mode if you want your application to be unaffected while the BA.js file is loading on your system.
    Starting this release, the BA.js file loads asynchronously by default. The async flag is included in the script tag as shown in the sample snippet. 
    <script type="text/javascript" id="ca_eum_ba" src="https://<hostname>:<port>/api/1/urn:ca:tenantId:<tenantID>/urn:ca:appId:<appID>/bajs?agent=browser" data-profileUrl="https://<hostname>:<port>/api/1/urn:ca:tenantId:<tenantID>/urn:ca:appId:<appId>/profile?agent=browser" data-tenantID="<tenantID>" data-appID="<appId>" data-appKey="<appKey>" async ></script>
    To disable the asynchronous loading of the file, remove the async flag from the snippet.
  • Sync or Detailed Mode
    : In this mode, the Browser Agent captures all the metrics. Use this mode if:
    • Any initial delay in capturing the metrics during the page load is acceptable while the BA.js file is still loading. 
    • You want all the instrumentation to be loaded before the page is executed.
Browser Agent Support for Angular
The Browser Agent version 2.3.0.9 onwards supports applications built on the Angular framework 5 and 6. The Browser Agent collects metrics similar to other web applications. However, you must make additional changes in the applications typescript or Javascript file to capture custom metrics and JavaScript errors.
  • JavaScript Errors
     Angular by default handles errors without throwing them to the browser. If the application does not throw the errors to the browser, the Browser Agent will not be able to capture them. For the Browser Agent to capture all the errors, ensure that the errors are thrown explicitly.
  • Custom Metrics
     To record the custom metrics,
    • Declare the BrowserAgentExtension to avoid compilation errors. For example, declare the variable that makes calls to the Extension functions at the top of the script file.
      declare var BrowserAgentExtension: any;
    • Wrap the function call for the Extensions in conditions to avoid compilation errors. For example, wrap the function call to check if BrowserAgentExtension is defined.
      if(typeof BrowserAgentExtension !== "undefined"){ BrowserAgentExtension.setCustomerId({"customerId" : customer_id.value , "attributes" : { "keyattr" : "value" } }); console.log("setting customer id as custom attributes : "+customer_id.value); } else console.log("Please check if BA is getting injected");
Browser Agent Snippet in the Basic Application and Applications within Frames is Supported 
Starting this release, you can include the Browser Agent snippet in the base application and in the applications that are in the frames. Metrics that the Browser Agent sends are also displayed in the corresponding applications in the admin console as the session ID generated for each of applications is unique.
In the earlier versions, when the browser agent snippet was included in both the base application and the application within the frames, metrics that these applications sent were not displayed in the corresponding applications in the 
App Experience Analytics
 admin console. For example, app A (APPID=APP_A) is a base application and app B (APPID=APP_B) is an application in a frame. When a user navigated from app A to app B,
  • Metrics for app A and app B were not tied to their corresponding session IDs.
  • Metrics were not displayed in the corresponding applications in 
    App Experience Analytics
     admin console.
Added Support for CORS Errors
Starting this roll out, the Browser Agent captures metrics related to the Cross-Origin and iFrame errors that the web page encounters through AJAX calls because of xframe origin settings and the Cross-Origin errors. The Browser Agent also reports the same captured information as 
CORSError
 in 
App Experience Analytics
.
The CORSErrors are categorized as Page Errors in 
App Experience Analytics
. However, in the JS and AJAX Errors Kibana dashboard, they are considered as JavaScript Errors.
The following are some of the errors that the Browser Agent captures:
For more information about CORS, see the 
CORS Errors
 documentation.
Changes in 
App Experience Analytics
 for CORS Errors
The 
JavaScript Errors
 tab in the 
App Crashes and Errors
 page is renamed to 
Page Errors
. This page displays the CORS and iFrame related errors as CORS Error. Select the error and drill-down from this page to view the Pages and Transactions containing these errors. In the 
Pages with the error
 section, click the page URL to view the sessions that include the selected error. In the 
Transactions with the error
 section, click the transaction to view all the transactions that include this error.
The 
ALL EVENTS
 section in the App Sessions page also displays all the events that include the CORS error. Click the error to view the error details.