Add apps to New Relic Browser

New Relic Browser uses a JavaScript snippet to instrument your app's webpages. The JavaScript collects data for browser monitoring. To enable your app in New Relic Browser, use any of the available options.

For a library of videos about how to get started with New Relic Browser, how to enable and configure it, and how to get the most out of the user interface, visit learn.newrelic.com.

Select a deployment option

No matter which option you use to deploy New Relic Browser, the result is the same: injecting the New Relic Browser JavaScript snippet into your app for browser monitoring. The method you select depends on your own preferences or business needs.

New Relic Browser deployment option Description
Select an app monitored by New Relic APM By allowing New Relic Browser to inject the browser monitoring JavaScript snippet for you, this offers the easiest way to deploy an app that already is being monitored by New Relic APM. (These apps are listed on your New Relic APM Applications index.)
Paste the JavaScript snippet into your New Relic APM app This allows you to control the exact placement of the JavaScript into your app's webpage(s) by copying and pasting the New Relic Browser JavaScript snippet. This is useful when your APM app is not as closely coupled to the browser app as it is with a standard server-side app (for example, when your client-side app talks to a REST API back end).
Enable single-page app (SPA) monitoring

You can select the option to New Relic's enable your single-page app for SPA data collection.

Access to this feature depends on your subscription level.

Enable a standalone app This allows you to use New Relic Browser without also deploying other products (such as New Relic APM) by copying and pasting a JavaScript snippet into your app's webpage. This option is useful for monitoring static sites (such as Jekyll) or cached pages delivered by CDN.
Use the New Relic REST API (v2) or API Explorer

The REST API (v2) provides a method to manage deployment outside the New Relic Browser user interface. This is useful, for example, with larger organizations deploying multiple apps.

Manually instrument using agent API

For apps that are monitored by New Relic APM, you can use the APM agent's API to inject the JavaScript.

Enable an APM-monitored app

Use this procedure to have New Relic Browser enable an app that is monitored by New Relic APM.

  1. Go to rpm.newrelic.com/browser > Add more.
  2. From the New Relic Browser deployment page, select Enable via New Relic APM.
  3. Select your choice of available options for Browser agent instrumentation features, based on your New Relic subscription level.
  4. Type or use the search window to find the app's name.
  5. Select Enable.
  6. Wait a few minutes for New Relic Browser to start collecting data, then select your app from the Browser applications index.

If data does not start to appear after a few minutes, or if you experience other problems, follow the procedures to troubleshoot browser monitoring installation.

Enable with copy/paste

Use this procedure to insert New Relic Browser's JavaScript snippet for browser monitoring into your app's webpages yourself. This option is useful for monitoring static sites (such as Jekyll) or cached pages delivered by CDN.

Near the bottom of the generated JavaScript is your New Relic Browser license key and application ID. This is useful, for example, when using the New Relic REST API (v2) or API Explorer.

  1. Go to rpm.newrelic.com/browser > Add more.
  2. From the New Relic Browser deployment page, select Copy/Paste JavaScript Code.
  3. Select your choice of available options for Browser agent instrumentation features, based on your New Relic subscription level.
  4. Name your app:

    • If your app is monitored by New Relic APM, select Yes, then type or use the search window to find the app's name.
    • If you have a standalone app for New Relic Browser (not monitored by New Relic APM), select No, then type the app's name.
  5. Select Generate snippet.
  6. Copy the code snippet that automatically appears, then paste it into your pages as close to the top of the <head> element as possible, but after any position-sensitive <meta> tags (for example, X-UA-Compatible or charset information).
  7. Wait a few minutes for New Relic Browser to start collecting data, then select your app from the Browser applications index.

If data does not start to appear after a few minutes, or if you experience other problems, follow the procedures to troubleshoot browser monitoring installation.

If you use the copy/paste method but do not finish the setup process, you can still view and copy the generated JavaScript snippet from your app's Browser Settings page or via the New Relic REST API (v2).

For more help

Additional documentation resources include:

Discuss Browser monitoring in the New Relic Online Technical Community! Troubleshoot and ask questions, or discuss JavaScript error reporting or AJAX timing in detail.

If you need additional help, get support at support.newrelic.com.