Add apps to Single Page App monitoring

SPA monitoring uses a JavaScript snippet to instrument your app's webpage and collect data for monitoring. To enable your app for SPA monitoring in New Relic Browser, use the same method you used when you originally deployed New Relic Browser for your app, either:

  • Automatically through the user interface
  • Copying and pasting the JavaScript snippet directly into your webpage

Access to this feature depends on your subscription level. Single page app (SPA) monitoring is only available with New Relic Browser Pro.


In order to deploy SPA monitoring, you must:

  • Make sure your app and Browser agent version meet New Relic's compatibility and requirements.
  • Agree to the Terms of Service, which automatically appears during the setup process for the first app you select for your account. By agreeing to the Terms, you authorize New Relic to collect hash fragments from URLs. You only need to select the checkbox option once for your account.

Enable SPA monitoring

To deploy SPA monitoring for your app:

  1. From New Relic Browser's Settings > Application settings, select Pro + SPA.
  2. Agree to the Terms of Service.
  3. Select Save application settings.
  4. If you originally used the copy and paste method to deploy New Relic Browser, copy the entire JavaScript code snippet. Paste it as close to the top of the HEAD of your webpage as possible, but after any position-sensitive META tags (for example, X-UA-Compatible or charset information).
  5. Wait a few minutes for New Relic Browser to start collecting SPA monitoring data.
  6. To view SPA monitoring data: From the New Relic menu bar, select Browser > Browser apps > (selected app) > Page views.

If SPA data does not start to appear in the Page views page after a few minutes, or if you experience other problems, see New Relic Browser's troubleshooting procedures.

Browser > (selected app) > Browser app > Settings > Application settings: Select the Pro + SPA option, agree to the Terms of Service, and save your application settings. If you originally used the copy and paste method to deploy your app to New Relic Browser, replace the JavaScript snippet with the new one for SPA monitoring.

The bottom of the generated JavaScript includes 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.

Disable SPA monitoring

To opt out of New Relic Browser's SPA monitoring feature:

  1. From the New Relic menu bar, select Browser > Browser apps > (selected app) > Settings > Application settings.
  2. Select a different agent version/loader option.
  3. Select Save application settings.

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