0.1.0-alpha-28 • Public • Published

New Relic Netlify Plugin

npm version GitHub issues License Libraries.io dependency status for latest release, scoped npm package Lines of code npm download stats

Automatically track your builds, mark your deployments, and install the browser agent with this New Relic Netlify Plugin.



Use file-based installation to install the plugin by modifying your netlify.toml

package = "@aaronbassett/newrelic-netlify-plugin"


You can control much of the plugin's settings via environment variables or in your netlify.toml.

package = "@aaronbassett/newrelic-netlify-plugin"

    failBuildOnPluginError = false
    newrelicAccountId = "123456"
    newrelicLicenseKey = "12345678901234567890"
    newrelicAppId = "123456789"
    newrelicApiKey = "1234567890QWERTYUIOP"
    newrelicBrowserLicenseKey = "POIU-0987654321"
    enableBrowserMonitoring = true

    onPreBuild = false
    onBuild = false
    onPostBuild = false
    onEnd = false
Name Description Default Value
failBuildOnPluginError Fail the whole build if the plugin has an error true
newrelicAccountId New Relic Account ID (required for event tracking & browser monitoring) undefined
newrelicLicenseKey New Relic Ingest License Key (required for event tracking) undefined
newrelicBrowserLicenseKey New Relic Ingest License Key (required for event tracking) undefined
newrelicAppId New Relic APM App ID (required for deployment marking & browser monitoring) undefined
newrelicApiKey New Relic User Key (required for deployment marking) undefined
setDeploymentMarkers Set this to to false to disable deployment marker creation true
setDeploymentMarkersForPreviews Set this to true if you want to create deployment markers for deploy previews false
recordEventsForPreviews Set this to true if you want to record events for deploy previews false
skipEvent.onPreBuild Set this to true to skip recording onPreBuild custom events false
skipEvent.onBuild Set this to true to skip recording onBuild custom events false
skipEvent.onPostBuild Set this to true to skip recording onPostBuild custom events false
skipEvent.onSuccess Set this to true to skip recording onSuccess custom events false
skipEvent.onError Set this to true to skip recording onError custom events false
skipEvent.onEnd Set this to true to skip recording onEnd custom events false
enableBrowserMonitoring Attempt to inject the browser monitor script tag into any HTML pages false
enableBrowserMonitoringForPreviews Set this to true if you want to enable browser monitoring for deploy previews false
distributedTracingEnabled Enable distributed tracing for browser requests true
cookiesEnabled Enable cookies for browser monitoring true
deployMarkerRevisionTemplate eploy marker UUID structure (EJS string) true

Deployment Tracking

The plugin will automatically track each deployment in New Relic. It will also provide a detailed ChangeLog to help you see at a glance what has changed between deployments. Modify the deployMarkerRevisionTemplate to change the revision UUID using EJS templates.

Deployment Tracking Interface in New Relic One

Custom Events

Track each successful build (and failure) with custom events.

New Relic One graphing custom Netlify events

Realtime Feedback in Netlify

Get a quick overview of the actions the plugin has performed, without ever leaving Netlify. Once a build has completed your deploy summary is populated.

Netlify deploy summary listing New Relic Plugin actions

Error Checking

The plugin can identify many common configuration problems, and provides you detailed information on what needs to be changed.

New Relic Netlify plugin error checking


npm i @aaronbassett/newrelic-netlify-plugin

DownloadsWeekly Downloads






Unpacked Size

5.77 MB

Total Files


Last publish


  • aaronbassett