Hi,
There are a couple of ways to do this.
- Manual injection
This is pretty straightforward method where you need to put the below config code at the start of <head> tag
<script>
window['adrum-start-time'] = new Date().getTime();
(function(config){
config.appKey = 'YOUR APP KEY';
config.adrumExtUrlHttp = 'http://cdn.appdynamics.com';
config.adrumExtUrlHttps = 'https://cdn.appdynamics.com';
config.beaconUrlHttp = 'http://col.eum-appdynamics.com';
config.beaconUrlHttps = 'https://col.eum-appdynamics.com';
config.xd = {enable : false};
})(window['adrum-config'] || (window['adrum-config'] = {}));
</script>
<script src='https://cdn.appdynamics.com/adrum/adrum-latest.js'></script>
If you want to host the 'https://cdn.appdynamics.com/adrum/adrum-latest.js' please download and replace the path in the last <script> tag accordingly.
https://docs.appdynamics.com/display/PRO43/Manual+Injection
- Automatic injection:
If you have a application which is also instrumented with our Java/.Net Application agent, then you can go in the APM application's configuration > User Experience App Integration module and turn on the automatic injection. The Application agent will do the JS agent injection for you. You do not have to change or add anything in your code.
https://docs.appdynamics.com/display/PRO43/Automatic+Injection
Please note:
Automatic injection is available only for server-side applications built on Jasper-supported JSP (Java), ASP.NET, or ASPX (.NET) frameworks.
If the server-side application does not return well-formed HTML, the JavaScript Agent may not be able to instrument the page. For example, the JavaScript Agent may not be able to instrument HTML pages that are missing elements or have unclosed tags.
... View more