This project was created to build Real User Monitoring into Salesforce Lightning web pages. It leverages the New Relic Browser framework to ingest data. By using this Salesforce control you can gain insights into how your Salesforce front end is performaing in real time.
-
Download repo
-
Ensure you access to a Salesforce Environment. You can create a Salesforce Developer Environment for testing.
-
Open your New Relic account and
Click on Add More Data
, select New Relic Browser -
Select,
Copy/Paste Javascript code
and provide aname
for your app, Click enable -
Copy the Javascript Snippet
-
Open
\force-app\main\default\staticresources\mon_primary_snippet.js
and copy the JavaScript snippet -
Remove the first
"<script type="text/javascript">"
and last"</script>"
lines from the snippet. Save mon_primary_snippet.js -
Open
\force-app\main\default\staticresources\mon_secondary_snippet.js
and copy the JavaScript snippet -
Remove the first
"<script type="text/javascript">"
and last"</script>"
lines from the snippet. Save mon_secondary_snippet.js -
Download and install the Salesforce CLI
-
Open a terminal/command session an change directory to the root of the project
-
Run
sfdx --version
to ensure the Salesforce CLI is correctly installed -
Create a profile and authenticate to your Salesforce environment:
sfdx force:auth:web:login -d -a MySalesForceDev-r https://newrelic-e-dev-ed.my.salesforce.com/
- Deploy the New Relic Browser Salesforce Component to your Salesforce environment
sfdx force:source:deploy -x package.xml -u MySalesForceDev
-
Log in to your Salesforce Environment and select Settings
-
In the
Quick Find
search box typeApp
and selectApp Manager
-
Select the App you wish to add the New Relic Browser monitor to, in this example,
Sales Console
selectEdit
-
Select
Utilty Items (Desktop Only)
from the left navigation area -
Select
Add Utility
, Scroll down toMon_AgentProxy
-
In the
Label Field
give the monitor a nameNR Sales
-
Select the
Start Automatically
Checkbox and SelectSave
-
Navigate back to
Setup
and SelectUsers
, and select the User to add the Browser montioring to -
Select
Permission Set Assignments
and SelectEdit Assigments
forPermission Set Assignments
-
Select
PS_MonAgentProxyUser
and SelectSave
-
Open the
Sales Console
App, at the bottom on theUtility Bar
there will be aNR Sales
Component. -
Installation is complete
-
Once installed data will flow to NR via the Browser Interaction Event, you can create Dashboards as per below
New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.
We encourage you to bring your experiences and questions to the Explorers Hub where our community members collaborate on solutions and new ideas.
We encourage your contributions to improve Salesforce Lightning Browser! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
Salesforce Lightning Browser is licensed under the Apache 2.0 License.