Browser JavaScript injection causes problems with a page

Problem

New Relic Browser is inserting its JavaScript instrumentation in a location that causes problems with markup or page load.

Solution

New Relic agents attempt to inject the JavaScript in the optimum location, but if you encounter problems, try these troubleshooting steps.

  1. Verify whether browser monitoring is the cause by disabling browser monitoring.
  2. If disabling browser monitoring solves the problem, investigate the source code for the page. Re-enable browser monitoring and check for the following possible issues:

    • More than one instance of the <html> tag in the page (not in an iFrame).
    • More than one instance of the <head> or <body> tag, or a missing <head> or <body> tag.
    • Occurrence of any <head> or <body> tags within the page's JavaScript.
    • Use http://validator.w3.org to verify your page source, and check for serious markup validity issues or character encoding issues.
  3. Eliminate any conflicts you find by revising the page structure, disabling browser monitoring for that page, or switching to manually instrumenting via agent API for full control over script injection.
  4. If you encounter other situations, contact New Relic Support and provide an accessible link to your page or the source code for it. Ensure browser monitoring is enabled in your link or source code.

For more help

Additional documentation resources include:

Discuss Browser monitoring in the New Relic Online Technical Community! Troubleshoot and ask questions, or discuss JavaScript error reporting or AJAX timing in detail.

If you need additional help, get support at support.newrelic.com.