• /
  • EnglishEspañol日本語한국어Português
  • Log inStart now

newrelic_disable_autorum (PHP agent API)

Syntax

newrelic_disable_autorum()

Disable automatic injection of the snippet on particular pages.

Requirements

Agent version 2.6.5.41 or higher.

Description

This call disables automatic injection of the browser monitoring agent for the current transaction. Call as early as possible. You can use this call to remove the JavaScript if the insertion is causing problems or if you are serving pages to third-party services that do not allow JavaScript (for example, Google's accelerated mobile pages).

Tip

To instead enable browser monitoring with an API call, see:

Parameters

This call does not accept any parameters.

Return values

Returns true if called within a New Relic transaction. Otherwise returns null if outside a transaction (for example, if newrelic_end_transaction() has been called).

Examples

function example() {
if (extension_loaded('newrelic')) { // Ensure PHP agent is available
newrelic_disable_autorum();
}
// ...
}
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.