With Copilot
Acquia Copilot is a conversational AI connected into our product documentation and knowledge base. Ask Copilot about product features, technical details, troubleshooting and how to get started with Acquia products.
Sign in to use Acquia Copilot
Acquia Support uses New Relic as a tool to help diagnose website performance problems. The New Relic service injects a small JavaScript agent into pages, allowing New Relic to gather data about the end user’s experience. This JavaScript injection may conflict with other JavaScript used on a website or cause validation errors, like the following validation error from Google’s AMP service:
The tag 'script' is disallowed except in specific forms.New Relic’s documentation provides the newrelic_disable_autorum() method to disable the injection of the New Relic Browser JavaScript agent for the current transaction.
To apply this code to a Drupal website, add the code for your version of Drupal to the bottom of your website’s settings.php file, adjusting [path_to_ignore] to the actual pages or paths you don’t want the New Relic agent to be injected into.
if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '[path_to_ignore]') !== false ) {
if (extension_loaded('newrelic')) { // Ensure PHP agent is available
newrelic_disable_autorum();
}
}If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.