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

Recommended way to stop New Relic JS injection in AMP pages

amp
java
javaagent
jsp

#1

We’re using JSP as the rendering mechanism. I see the following two ways to do disable injection in AMP pages.

  1. https://docs.newrelic.com/docs/browser/new-relic-browser/configuration/browser-settings-ui-options-browser-monitoring#enable-paste

Here we copy the JS from NR and manually include it on non-AMP pages.

  1. https://docs.newrelic.com/docs/agents/java-agent/instrumentation/new-relic-browser-java-agent#manual_instrumentation

Pls, see “JSP manual instrumentation” on the above page. Here we aren’t copying the JS, but rather we’re calling the APIs given by NR to get the JS injected on all non-AMP pages.

Which one is recommended here? I see both these options are possible with our set up. Just wondering if there is any pros / cons between these?


#3

A post was merged into an existing topic: Stopping NR Javascript injection in AMP pages


#4