• /
  • Log in

Install the browser monitoring agent

Browser uses a JavaScript snippet, also referred to as an "agent," to instrument your app's webpages. The JavaScript collects data for browser monitoring. To install the browser agent, you can choose from a number of deployment options.

If you don't have one already, create a New Relic account. It's free, forever.

Enable browser monitoring

Browser Pro+SPA is the default agent when you enable browser monitoring. This automatically gives you access to all of our browser monitoring features. For more information about the browser monitoring options, see Browser agent types in this document.

To enable browser monitoring:

  1. Go to one.newrelic.com, select Browser, and then select Add more data.
  2. Follow the instructions in the UI to add browser monitoring to your app.
  3. Generate some traffic for your app, then wait a few minutes for data to appear in New Relic.
  4. Optional: After installation is complete and you are seeing data, go to the App settings page for additional agent configuration, or to change the browser agent type.

It may take several minutes after enabling the browser monitoring agent before your webpage data appear in New Relic. If have problems, follow our troubleshooting tips.

Deployment options

No matter which option you use to deploy browser monitoring, the end result is the same: the browser monitoring JavaScript snippet (also referred to as the "agent") is inserted into your app pages. The method you select depends on your preferences and business needs.

Enable an APM-monitored app

When enabling browser monitoring, you can use an APM agent to automatically inject the browser monitoring JavaScript snippet for you. This is the easiest way to install the agent for an app that's already being monitored by APM.

APM-monitored apps are listed on your APM Applications index.

Enable with copy/paste

When enabling browser monitoring, you can manually insert the JavaScript snippet into your app's webpages. The copy/paste option gives you control over the exact placement of our JavaScript snippet, which is required to monitor the webpage's performance. This is useful for:

  • Standalone apps, static sites, and cached pages delivered by CDN
  • APM apps that are not as closely coupled to the browser app as with a standard server-side app (for example, when your client-side app talks to a REST API back end)

Some tips for using the JavaScript snippet:

  • Placement in your webpage: Copy the code snippet, then paste it inline 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). For more information on the inline head placement, see JavaScript placement requirements.
  • License key and app ID: Near the bottom of the generated JavaScript is your browser license key and application ID. This is useful with the REST API and API Explorer.

Instrument webpages using the APM agent

This information applies to apps that are also monitored by APM.

Our APM agents can instrument webpages with the required JavaScript for page load timing. If you are using an APM agent's API to manually add the JavaScript snippet to your webpages, insert the instrumentation snippet as close to the top as possible. This allows you to take advantage of detailed information about browser's AJAX calls and JavaScript errors.

For more information, see the instructions for your APM agent:

Use REST API

This information applies to apps that are also monitored by APM.

The REST API lets you manage deployment outside the browser monitoring UI. This is useful for large organizations deploying multiple apps.

Browser agent types: Lite, Pro, Pro+SPA

We have three types of browser agents: Lite, Pro, and Pro+SPA. The agent type has no impact on your billing.

Browser agent type

Comparison

Pro+SPA

This is the default installed agent when you enable browser monitoring.

What it includes:

  • Gives you access to all of the Browser Pro features and to Single Page App (SPA) monitoring.

  • Provides detailed page timing data and the most up-to-date New Relic features, including distributed tracing, for all types of applications.

    Pro+SPA is not limited only to single page applications. After install, you can downgrade anytime to the less advanced agents if you don't want or need SPA monitoring.

Pro

What it includes: Gives you access to the Browser Pro features.

What it doesn't include: Lacks the functionality designed for single page app monitoring.

Lite

What it includes: Gives you information about some basic page load timing and browser user information.

What it doesn't include: Lacks the Browser Pro features and SPA features.

Details about how agent types relate to pricing:

  • New Relic One pricing: This pricing plan has data ingest as a billing factor. If you want to reduce data ingest, you may want to consider downgrading to lesser agent types after install.
  • Original pricing: Your access to browser monitoring features is gated by your subscription plan, not by the agent type. This means there is no reason not to use the default Pro+SPA agent.

After initial agent installation is finished, you can go to the App settings page to edit your configuration or to change your subscription.

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.