.js file. This allows the page to reference the
.js file during page load.
In order to use New Relic Browser to monitor Salesforce Lightning pages, make sure you follow these requirements:
CSP and Salesforce Lightning
Browser agent requirements
Application or platform
Your app or platform where your site is hosted must meet New Relic Browser's standard compatibility requirements. Exception: CSP restrictions prevent you from linking an APM app for Browser monitoring.
You must have a Pro+SPA Browser subscription for your app.
Host location for domains
Browser agent version
Follow the Salesforce procedures to add New Relic Browser URLs to your CSP whitelist. Add both of these New Relic Browser domains to your CSP whitelist:
https://js-agent.newrelic.com: This is where the New Relic Browser agent is hosted. The Browser agent download requires three files to run. Two are downloaded after the initial agent is run to continue capturing performance data.
https://bam.nr-data.net: This is the endpoint where the New Relic Browser agent receives data from your site.
To create and host a
- Go to rpm.newrelic.com/browser.
- From the list of Browser apps, select the app for which you want to self-host the Browser agent.
- Save and exit the Browser app's Application settings page.
Continue with the procedures to create a
.js file for your page.
- Delete the first line (
- Save the text file as
nr-spa-AGENT_VERSION.min.js, where AGENT_VERSION is the latest Browser agent version.
- Upload the
.jsfile in the
<head>of your webpage.