Improve your website's performance

A good website — you know it when you see it, right? You never notice any load times, it's available whenever you need it, and, of course, errors are nowhere to be found. But measuring your site's performance is tricky, and improving it is even trickier.

This tutorial walks you through how to use New Relic to improve your site's experience. You'll start by "instrumenting" your site, which means adding some JavaScript code that measures the actual end-user experience for each visit. From there, you'll learn to find out how your site is performing today, where you can improve it, and how you can keep an eye on things in future.

Improve your website's performance

Step 1 of 5

Instrument your site

Before you can improve your site's performance, you need the ability to see what's going on. New Relic monitoring always starts with an integration, or a piece of code that collects data from a relevant technology and reports it to New Relic.

To monitor the frontend of your website, you'll want to use our browser monitoring agent integration. It's a small snippet of JavaScript that you'll include in your HTML <head>, very similar to Google Analytics or other scripts.

There are two basic ways to install the browser monitoring agent:

You can deploy the agent by itself by copy-pasting the JavaScript snippet into whatever part of your code generates the <head> for your webpage.

Get copy-paste snippet
Installation options

If you're monitoring your backend with one of our APM agents, it can automatically inject the browser monitoring agent into the appropriate part of your webpage.

Java agent
.NET agent
Node.js agent
PHP agent
Python agent
Ruby agent
Step 2 of 5

Review your core web vitals

Core web vitals are metrics that give you insight into your users' experience with your site. Low scores often indicate a poor experience, which can deteriorate your relationship with your end users. New Relic has capabilities you can use to track these metrics.

Step 3 of 5

Fix latency issues

High latency can frustrate users and even cause them to stop using your site altogether. You can use to locate latency issues across your services and begin fixing them. You can also see our brief tutorial to learn how to find out what the source of your high latency to begin addressing the issue.

Step 4 of 5

Reduce JavaScript errors

JavaScript errors can cause a number of issues with your site, any one of which could negatively impact the frontend experience for your customers. New Relic features a JS errors page for your integrated apps.

Step 5 of 5

Establish benchmarks

Sometimes, site performance can dip below acceptable levels without necessarily causing major errors. Even without major errors or spikes, your site could still be performing poorly enough to affect overall customer satisfaction. You can create service-level benchmarks to help track your sites performance, and identify issues before they become problems.

Learn more about New Relic features

Ready to learn more about what you can do with New Relic to improve your site performance? Check out our docs on , and learn more about how you can use this feature to optimize your customer experience.