---
title: newrelic_disable_autorum (PHP agent API)
source: https://docs.newrelic.com/docs/apm/agents/php-agent/php-agent-api/newrelic_disable_autorum
---

## Syntax

```php
newrelic_disable_autorum()
```

Disable automatic injection of the browser monitoring snippet on particular pages.

## Requirements

Agent version [2.6.5.41](https://docs.newrelic.com/docs/release-notes/agent-release-notes/php-release-notes/php-agent-26541) or higher.

## Description

This call disables automatic injection of the [browser monitoring](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/introduction-new-relic-browser) 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](https://docs.newrelic.com/docs/browser/new-relic-browser/troubleshooting/browser-javascript-injection-causes-problems-page) or if you are serving pages to third-party services that do not allow JavaScript (for example, [Google's accelerated mobile pages](https://docs.newrelic.com/docs/browser/new-relic-browser/troubleshooting/google-amp-validator-fails-due-3rd-party-script)).

> #### 💡 TIP
>
> To instead **enable** browser monitoring with an API call, see:
>
> -   [`newrelic_get_browser_timing_footer()`](https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_get_browser_timing_footer)
> -   [`newrelic_get_browser_timing_header()`](https://docs.newrelic.com/docs/agents/php-agent/php-agent-api/newrelic_get_browser_timing_header)

## 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

```php
function example() {
    if (extension_loaded('newrelic')) { // Ensure PHP agent is available
        newrelic_disable_autorum();
    }
    // ...
}
```
