To report data to New Relic, your application must meet two basic requirements:
- Clients accessing the application must be able to send data to New Relic through HTTP requests. HTTPS is required for the more advanced browser monitoring features.
Browsers that subscribe to a disconnect list or that use content filtering extensions such as AdBlock may not be able to report data to New Relic. For example, if you are using the Enhanced Tracking Prevention disconnect list for Mozilla Firefox 69.0 or higher, you will need to change the default configuration.
Most typical browser applications meet these requirements, but some browser applications in restricted environments may have difficulty reporting data to New Relic. For example:
- Hybrid mobile applications
- Applications installed on unusual hardware, such as point-of-sale terminals or consumer appliances
The browser agent officially supports the following browser versions:
- Chrome (previous 10 versions)
- Safari (previous 10 versions)
- Firefox (previous 10 versions)
- Edge (previous 10 versions)
Instrumentation and specific features may be compatible with other browsers or versions.
AJAX timing features are not available with:
New Relic can only monitor browsers that are compatible with SHA-256.
When you use browser monitoring with cookies, New Relic's cookies are a third-party cookie on your site, and may not store or work on certain web browsers used by your visitors. See the applicable browser's websites for details about their compatibility with third-party cookies.
One way to deploy browser monitoring for an app is using one of our APM agents.
If you're deploying browser for an app already being monitored by APM, make sure your APM agent version supports browser monitoring:
- Go: Version 2.5.0 or higher
- Java: Version 3.4.0 or higher
- .NET: Version 184.108.40.206 or higher
- Node.js: Version 1.4.0 or higher
- PHP: Version 220.127.116.11 or higher
- Python: Version 18.104.22.168 or higher
- Ruby: Version 22.214.171.124 or higher
Supported frameworks and libraries
If you're using AngularJS and you want to use our SPA monitoring features, note that Zone.js versions 0.6.18 to 0.6.24 are not compatible with browser. In all cases, the browser agent must be loaded before Zone.js to avoid errors.
Browser is unable to properly instrument the
This will only affect customers running tests with the browser agent present in their code. Production applications should not be affected.
The browser agent is not compatible with MooTools versions older than
Single page app (SPA) monitoring
To use the features related to single page app (SPA) monitoring, your app must meet these requirements.
SPA: Browser agent version
SPA monitoring requires an SPA-specific version of the browser snippet, available for browser agent version 885 or higher. This version of the agent is enabled by default.
SPA: Browser types
SPA monitoring requires the
addEventListener browser API and the Navigation Timing API. Both APIs are available in all modern browsers, including Google Chrome, Mozilla Firefox, Apple Safari, and Microsoft Internet Explorer (IE) versions 9 or higher.
SPA: Framework requirements
Because SPA instrumentation works by wrapping low-level browser APIs, it is framework-agnostic. SPA instrumentation is compatible with most SPA frameworks, such as Angular, Backbone, Ember, and React. It can also instrument requests made using JSONP.
Below are known compatibility issues:
- If your application uses AngularJS and you want to use browser's SPA monitoring capabilities, Zone.js versions 0.6.18-0.6.24 are not compatible with the SPA agent.
- The html2pdf.js library is not compatible with the SPA agent.
- Angular versions 12 through 14 contains a limitation around the size of individual script elements contained within the index HTML source. See this troubleshooting page for more information.
- Next.JS has a known incompatibility since version 13.3.2-canary.2 where using the app router can result in links on the page not working. See this troubleshooting page for more information.
SPA: Security for hash fragments
We collect and save hash fragments from route change URLs. If you use hashes to pass private or sensitive data, that data may be visible to your New Relic account users. Follow browser's guidelines for security with data collection and reporting.
Content Security Policy (CSP) considerations
When requesting a CSP exception, follow your organization's standard procedures to contact your web or security team. The CSP exceptions for your use case depend on the browser agent version you're currently running. We always recommend updating to the latest version of the browser agent.
You can add all of these exceptions to the fallback
default-src directive (instead of
connect-src). The browser agent requires the following CSP exceptions:
Add to the
Add to the
The agent attempts to send payloads to subdomains of
Starting with browser agent 1.247.0, the agent will respect a
nonce attribute attached to the inline script when loading additional code chunks. If your site or infrastructure is capable of injecting a
nonce attribute on the inline browser agent script, you will only need to request a CSP exception for
nonce support doesn't apply to the usage of the browser agent npm package. With the npm package, the agent becomes a part of your site or app code. Any additional chunks loaded will be done so through your app code and you have complete control over when and if a
nonce attribute is used.
Some APM agents capable of injecting the browser agent also support adding a
nonce attribute to the injected script.
This feature is currently available for those using the copy/paste or npm browser installation methods. There are currently no UI or NerdGraph configuration options available. We're continuing to work on improving access to these and other configuration options.
Starting with browser agent 1.240.0, the agent can be configured to proxy network requests through another domain and path combination that you control. Depending on your proxy configuration and CSP settings, you may not need to request exceptions for adding New Relic domains to
connect-src. Check out our proxy docs for more information including a guide on configuring the agent.
Sub-Resource Integrity (SRI)
The browser agent utilizes code splitting to make the inline snippet of code as small as possible. The additional code necessary for the agent to function is loaded at runtime from our content delivery network (CDN). As an added layer of security, beginning with browser agent 1.247.0, the agent snippet contains hashes of all additional code chunks that could be loaded during runtime. These hashes are used by the browser to verify the code loaded from the CDN hasn't been unintentionally modified, either on the CDN or while in transit via a man-in-the-middle attack.
SRI hashes don't apply to usage of the browser agent npm package. With the npm package, the agent becomes a part of your site or app code making our generated hashes invalid.
For more information on how SRI security works, see this MDN article.