---
title: Node.js agent browser monitoring settings
source: https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration-browser-monitoring-settings
---

This page covers the Node.js agent settings for browser monitoring, including enabling JavaScript header injection and controlling which attributes are forwarded to browser monitoring.

> #### 💡 TIP
>
> Back to the full settings index: [Node.js agent configuration](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration)

## Browser monitoring variables [#browser-variables]

This section defines the Node.js agent variables in the order they typically appear in the `browser_monitoring: {` section of your app's `newrelic.js` configuration file.

**enable**

| Type                              | Boolean                            |
| --------------------------------- | ---------------------------------- |
| Default                           | `true`                             |
| [Environ variable](#environment)  | `NEW_RELIC_BROWSER_MONITOR_ENABLE` |
| [Server-side label](#server-side) | `Enable browser monitoring?`       |

Generate JavaScript headers for browser instrumentation. If set to `true` the agent does not automatically inject the browser JS code unless you have [manually enabled browser monitoring](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser). Even if you have enabled it and [added the browser timing header](https://docs.newrelic.com/docs/agents/nodejs-agent/supported-features/page-load-timing-nodejs#procedures), you can [disable browser monitoring for your app](https://docs.newrelic.com/docs/agents/nodejs-agent/supported-features/page-load-timing-nodejs#disabling) by setting this to `false`.

**debug**

| Type                             | Boolean                           |
| -------------------------------- | --------------------------------- |
| Default                          | `false`                           |
| [Environ variable](#environment) | `NEW_RELIC_BROWSER_MONITOR_DEBUG` |

If `true`, request un-minified sources from the server.

**attributes.enabled**

| Type                             | Boolean                                           |
| -------------------------------- | ------------------------------------------------- |
| Default                          | `false`                                           |
| [Environ variable](#environment) | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_ENABLED` |

If `true`, the agent sends custom attributes to browser monitoring.

> #### ⚠️ CAUTION
>
> Any header-related include/exclude rules must be in camelCase form to be filtered.

**attributes.exclude**

| Type                             | Array                                             |
| -------------------------------- | ------------------------------------------------- |
| Default                          | `[]`                                              |
| [Environ variable](#environment) | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_EXCLUDE` |

Prefix of attributes to exclude from browser monitoring. Allows `*` as wildcard at end.

**attributes.include**

| Type                             | Array                                             |
| -------------------------------- | ------------------------------------------------- |
| Default                          | `[]`                                              |
| [Environ variable](#environment) | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_INCLUDE` |

Prefix of attributes to include in browser monitoring. Allows `*` as wildcard at end.
