Follow

Setting up end-user monitoring (JavaScript snippet)

You can monitor end-user experience data by adding a JavaScript snippet to the <head> element of your web application's page. The snippet enables you to monitor key metrics of your end users' experience with your application.

End-user data is available only for browser-based rich Internet applications (RIAs) that are based on HTML and JavaScript. End-user data might not be available for native mobile applications or desktop applications.

To prepare the snippet from the console

  1. From the TrueSight Pulse console, select Settings > End User Experience.
  2. Enter the name of the application you want to monitor (for example, AcmeBookStore) and click Generate. The application name can be up to 100 characters long.

    End User Experience monitoring JavaScript snippet
    Click to enlarge image.
    End User Experience monitoring JavaScript snippet

    <script type="text/javascript">
          var BMCRum = {
              startTime: new Date().getTime(),
              token: "automaticallyGeneratedToken",
              appName: "AcmeBookStore"
         };
    </script>
    <script type="text/javascript" src="https://eue.truesight.bmc.com/euem-1.0.0.min.js"></script>

    The snippet includes an automatically generated unique token, used to identify the account.

  3. To copy the automatically generated snippet, click the Copy to clipboard icon.

To insert the snippet in your application

  1. In your application's HTML page, copy the content of the snippet script and paste it in the <head> element:
    • If the <head> element contains a <meta> element, insert the snippet after the <meta> element.
    • If the <head> element contains a <script> element, insert the snippet before the first <script> element.
    • If the <head> element does not contain a <script> element, insert the snippet at the end of the <head> element, before the closing </head> tag.
  2. Save the page.

  3. Check that the snippet appears in your application's web pages.

Where to go from here

After you set up your application for end-user monitoring, examine monitored metrics on dashboards.

 

Have more questions? Submit a request