[PHP] How to disable browser monitoring by WP plugins or by specific url

Hi all,

I’m new to newrelic and have some problems implementing the browser agent.

We are using Wordpress with MailPoet plugin, as we generate a newsletter the browser monitoring inject his js, but went we send it over to sendinblue the injected js hit an error.

So I have seen in the documentation how to disable the monitoring by adding some php code, but as we using a commercial plugin we can not modify the plugins code.

The question is how can I disable the js injection for this specific function … or even by url filtering, is this possible ?

The agent is the php-agent.

Regard’s

Franck

Nobody has ever encountered this problem ?

Hi, @franck.pereira: What if you disable browser auto-instrumentation, and use the copy/paste method to add the Browser agent only to the pages where you want it?

hi,

As we try to keep the wordpress (and the plugins) as stock as possible, the copy/paste solution seem’s not the best, that said we have a certain number of web sites hosted and it seem’s complicated to generate and add this manually to each site/page.

That’s why i’m looking more for black/white list solution for some specific url’s that’s the same across all sites (as we are using mostly the same plugins).

Regard’s
Claude

@franck.pereira hi there, Sal on the PHP Support team here.

If your commercial plugin provides any hooks, you could likely just use the newrelic_disable_autorum API function inside the hook.

It looks like MailPoet provides hooks to use in plenty of places, so this method may be worth a shot! Let us know how it goes.

1 Like