0

Is there any way to disable the New Relic script tag from being output in a single template?

EllisLab's docs say you can disable it via the control panel overall, but I really need it removed just from a single template (which becomes an email template).

https://ellislab.com/expressionengine/user-guide/monitoring/new-relic.html

Thanks!

2 Answers 2

1

Have you tried the New Relic PHP api??

https://docs.newrelic.com/docs/agents/php-agent/configuration/php-agent-api

Specifically

newrelic_disable_autorum (  )

Perhaps if you turned PHP (output) on in your header embeds/templates, you could do something like this before your doctype declaration:

<?php
if (extension_loaded('newrelic') &&
    "{segment_1}/{segment_2}" == "email/contact")
{
    newrelic_disable_autorum();
}
?>
1

There's no way of doing this currently, but I can add it to our list of things to think about. Maybe a hidden config where you can add template group and template pairs:

$config['newrelic_template_ignore'] = array(
    'template_group/template',
    'other_template_group/*'
);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.