Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Disable Browser Monitoring



Our application (hosted in IIS) uses the newrelic browser monitoring for all pages. However we have a new request that for certain pages (.net MVC views) and conditions third party cookies are not allowed (like JSESSIONID). Also the automatically injected newrelic script is not allowed.
Normally NewRelic.Api.Agent.NewRelic.DisableBrowserMonitoring(); should work but it seems that our current architecture has side effects.
All requests to those specific pages are actually rewritten (with IIS Url Rewrite Module) from our main app to another app (that is hosted on separate servers and has it’s own internal domain that is not visible to the user). I added NewRelic.Api.Agent.NewRelic.DisableBrowserMonitoring() in the specific views. If I access the views via the internal domain (directly from the web server) the newrelic script is not injected but if I access the page via normal flow starting from main app the newrelic script is automatically injected.
The browser monitoring is setup for the main domain name.
Any ideas how to fix this?

Thank you in advance,


Since the IIS Rewrite Module goes through the .NET CLR Pipeline it ends up as a different transaction at times.

Another option would be to use the newrelic.config option to exclude patterns of URLs:


Thank you. I’ll try to disable it via config.


Hi @gina.lazar,

For the benefit of the community, can you let us know how the solution @beastman suggested worked out for you? Thanks!


Yep, that did the trick.