---
title: Troubleshoot your browser monitoring installation
source: https://docs.newrelic.com/docs/browser/browser-monitoring/troubleshooting/troubleshoot-your-browser-monitoring-installation
---

## Problem

If you have just configured your application with browser monitoring, wait a few minutes for data to appear. If you have already waited a few minutes and you still do not see any data, try these troubleshooting tips. Some of these tips depend on whether you [deployed your app](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/adding-apps-new-relic-browser) by allowing browser monitoring to automatically insert the JavaScript snippet into your APM-monitored app or by inserting the JavaScript snippet through direct placement or the NPM package.

## Solution

Recommendation: Once Diagnostics CLI is downloaded, target the browser checks by running the command-line options: `/nrdiag -browser-url YOUR-WEBSITE-URL -suites browser`. The information returned from Diagnostics CLI can be used when communicating with New Relic Support.

If your browser monitoring agent was deployed for an account monitored with an APM agent, see [APM deployments](#apm-tips). If your browser monitoring agent was deployed using the JavaScript copy/paste method, see [Copy/paste deployment](#manual-tips). Installations via NPM will require self-troubleshooting as that depends and varies based on your project build and bundler. If you are unsure which you have, the Diagnostics tool will return the deployment method.

You can also troubleshoot situations where you are missing only [AJAX](https://docs.newrelic.com/docs/browser/new-relic-browser/troubleshooting/troubleshooting-ajax-data-collection) or [session trace](https://docs.newrelic.com/docs/browser/new-relic-browser/troubleshooting/troubleshooting-session-trace-collection) data.

### Deployment via APM agent [#apm-tips]

These troubleshooting steps apply to problems when the browser monitoring agent is installed on an app already being [monitored by an APM agent](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser#select-apm-app):

**Enable your app**

Verify that browser monitoring has been enabled in your application's **Browser settings**:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Browser > (select an app) > Settings**.
2.  Follow standard procedures to [enable browser settings](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring#enabling) for each app.
3.  Flush your [webserver cache](#restart_app).
4.  Wait a few more minutes for data to arrive.
5.  Try the next steps if you still do not see any data.

**Update your APM agent**

More recent APM agents place the page load timing scripts more accurately. Before continuing with these troubleshooting tips, make sure you have the [most recent release](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/keeping-new-relic-date) for your APM agent.

> #### 💡 TIP
>
> For agent version requirements for page load timing, see [Compatibility and requirements](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/compatibility-requirements).

**Verify the JavaScript snippets**

Check your page's source for the two script elements required to capture metrics and send them to New Relic. In a browser, view the source of your page, and look for a script element near the beginning like this:

````html
<script type="text/javascript">
    ;window.NREUM||(NREUM={});NREUM.init={ ...
```

Also verify that a line like this exists somewhere in the HTML:

```html
    window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net"...
```

If either script element is missing, continue troubleshooting with the following steps. If the script elements are present and data does not appear after several minutes, get support at [support.newrelic.com](https://support.newrelic.com "Link opens in a new window").

````

**Check other JavaScript error monitors**

If you see JavaScript errors on your webpage, or if you do not see any data on your [**Errors** page](https://docs.newrelic.com/docs/errors-inbox/browser-tab) in the New Relic UI, check if any other JavaScript error monitoring frameworks have been enabled for your app. Some JavaScript error monitors may interfere with functionality for browser monitoring.

**Configure auto-instrumentation**

If you are using New Relic's automatic instrumentation feature, ensure your agent is configured properly. Each agent has a configuration file setting and specific instructions to turn auto-instrumentation on or off:

-   **Go**: n/a
-   [Java](https://docs.newrelic.com/docs/agents/java-agent/instrumentation/page-load-timing-java#auto_instrumentation)
-   [.NET](https://docs.newrelic.com/docs/agents/net-agent/features/page-load-timing-net#auto_instrumentation)
-   Node.js agent: Currently not supported; see [manual instrumentation procedures](https://docs.newrelic.com/docs/agents/nodejs-agent/supported-features/page-load-timing-nodejs)
-   [PHP](https://docs.newrelic.com/docs/agents/php-agent/features/page-load-timing-php#auto_instrumentation)
-   [Python](https://docs.newrelic.com/docs/agents/python-agent/supported-features/page-load-timing-python#automatic_instrumentation)
-   [Ruby](https://docs.newrelic.com/docs/agents/ruby-agent/features/page-load-timing-ruby#auto_instrumentation)

    > #### ⚠️ IMPORTANT
    >
    > If you modify your agent's configuration file, be sure to [restart your app](#restart_app).

**Verify manual API instrumentation**

If you are manually calling the New Relic agent API to generate and insert the JavaScript, verify that the calls are actually being made. The APIs and how to use them are specific to your agent:

-   **Go**: n/a
-   [Java agent](https://docs.newrelic.com/docs/agents/java-agent/instrumentation/page-load-timing-java#manual_instrumentation)
-   [.NET agent](https://docs.newrelic.com/docs/agents/net-agent/features/page-load-timing-net#manual_instrumentation)
-   [Node.js agent](https://docs.newrelic.com/docs/agents/nodejs-agent/supported-features/page-load-timing-nodejs) (see also the [Node.js troubleshooting procedures](https://docs.newrelic.com/docs/agents/nodejs-agent/troubleshooting/troubleshooting-page-load-timing-nodejs))
-   [PHP agent](https://docs.newrelic.com/docs/agents/php-agent/features/page-load-timing-php#manual_instrumentation)
-   [Python agent](https://docs.newrelic.com/docs/agents/python-agent/supported-features/page-load-timing-python#manual_instrumentation)
-   [Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/features/page-load-timing-ruby#manual_instrumentation)

**Restart your APM app**

If you modified your APM agent's configuration file, be sure to restart your application so that it picks up the modified settings.

-   Java agent: Flush the app server’s "work" cache. This forces the app server to recompile.
-   .NET agent: Make sure your **asp.net** cache directory is clean by using the command `flush_dotnet_temp.cmd`. This forces the app server to recompile ASPs with page load timing instrumentation.

**Checkpoint: Verify JavaScript on page**

Verify that the JavaScript is on the page as detailed in the previous step [Verify the JavaScript snippets](#javascript). If it is not on the page, use the manual instrumentation as detailed in [Verify manual API instrumentation](#manual_api_instrumentation). The Javascript must be present on your page before you can proceed to the next step.

**Verify end-user network access**

If your application is loaded primarily within a secured local network, ensure that your users can reach the necessary network endpoints to report browser data. This includes New Relic's [CDNs and beacon](https://docs.newrelic.com/docs/browser/new-relic-browser/performance-quality/security-new-relic-browser#cdn).

### Deployment via JavaScript copy/paste [#manual-tips]

These troubleshooting steps apply to problems when New Relic's browser monitoring agent was deployed using the [HTML copy/paste method](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser#copy-paste-app):

**Enable your app**

Verify that browser monitoring has been enabled in your application's **Browser settings**:

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Browser > (select an app) > Settings**.
2.  Follow standard procedures to [enable browser settings](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring#enabling) for each app.
3.  Flush your [webserver cache](#restart_app).
4.  Wait a few more minutes for data to arrive.
5.  Try the next steps if you still do not see any data.

**Verify the JavaScript snippets**

Check your page's source for the script element required to capture metrics and send them to New Relic. In a browser, view the source of your page, and look for a script element near the beginning like this:

````html
<script type="text/javascript">
    ;window.NREUM||(NREUM={});NREUM.init={ ... 
```

If the script element is missing, make sure that you have pasted it in and deployed your new code. If you have not yet pasted in the JavaScript snippet, you can copy it again from your browser app's [<DNT>**Settings**</DNT> page](/docs/browser/new-relic-browser/installation-configuration/browser-settings-ui-options-browser-monitoring). If applicable, restart the application serving these pages.

If you still don't see the script, continue troubleshooting with the following steps.

````

**Clear any cached versions of your pages**

For the Javascript snippets to appear in pages served by your application, ensure that any cached versions of the pages from before you added the code have been cleared.

1.  Check any CDN caches.
2.  Flush your webserver cache.

**Check the JavaScript placement and completeness**

Insert the JavaScript as close to the top of the `head` as possible, but after any position-sensitive `meta` tags (X-UA-Compatible and charset). It must be outside any comments. Here is an example of the general format:

````html
<!DOCTYPE html>
<html>
<head>
    <meta tags>
    {PLACE NEW RELIC SCRIPT TAG HERE}
    <script and link tags>
</head>
<body>
    ...
</body>
</html>
```

If the Javascript is correctly placed, compare the final HTML served to your users with the original pasted snippet to ensure it's complete and identical. Incomplete or modified snippets may not report correctly. This could happen with frameworks that try to sanitize or alter raw javascript rendered without using the appropriate method.

````

**Check other JavaScript error monitors**

If you see JavaScript errors on your webpage, or if you do not see any data on your [**JavaScript errors** page](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/js-errors-dashboard-examining-errors-over-time) in the New Relic UI, check if any other JavaScript error monitoring frameworks have been enabled for your app. Some JavaScript error monitors may interfere with functionality for browser monitoring.

**Verify end-user network access**

If your application is loaded primarily within a secured local network, ensure that your users can reach the necessary network endpoints to report browser data. This includes New Relic's [CDNs and beacon](https://docs.newrelic.com/docs/browser/new-relic-browser/performance-quality/security-new-relic-browser#cdn).

**Razor framework: Check for a parser error message**

If you use the [copy/paste installation method](https://docs.newrelic.com/docs/browser/new-relic-browser/installation-configuration/adding-apps-new-relic-browser#copy-paste-app) in a .NET app that uses the Razor Framework, this may result in the following error:

````
Parser Error Message: "").pop().split("" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid.
```

```
error CS0103: The name 'nr' does not exist in the current context
```

The error is caused by an `@` symbol in the JavaScript snippet for browser monitoring . The `@` symbol represents the beginning of a code block in Razor. The line that causes the problem is:

```js
.split("@").pop().split(":")
```

```js
"@nr="
```

To fix this issue, use <DNT>**one**</DNT> of these workarounds:

* Wrap the browser JavaScript snippet in `<text></text>` tags to force it to be interpreted as content.

  OR
* Add another `@` to the line to escape it. Check that the line looks like this:

  ```js
  .split("@@").pop().split(":")
  ```

  ```js
  "@@nr="
  ```

Use only one of the workarounds. Using both will break the code again.

````
