cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Dynatrace UEM 6.5: Do I have to insert dtagent.js tag on each html page of any hybrid app?

Hello there, As in per documentation, there two script tags which needs to be added to the html pages in head section. One is so called init code. Other is the actual js agent (as explained in comment section by Gernot here). The init snippet has to be included in default index.html of the app + the dt agent tag. But do I have to include the second tag every other time on every other html pages in hybrid app?

PFB image:

7 REPLIES 7

Babar_Qayyum
DynaMight Leader
DynaMight Leader

Hello Rajesh,

Which second tag you are referring?

You don't need to put the code manually on all the html pages because the initcode does the same thing dynamically.

We recently done a manual instrumentation of Web/App and placed the same initcode only on the following three different locations because of the design of application and especially to send the POST information to dynatrace monitor :

  • index.html
  • login.html
  • xyz.js or you can say a common JS

Now we can change the feature-hashes on the fly, which was not possible before introducing the initcode. Only one thing needs to be remember that with the manual instrumentation we will have to change the injection point as manually.

The way we instrument the Hybrid application, there is no need to change the sensor properties as manually because it works fine with the automatically injection.

Regards,

Babar

Thank you Babar for help! The second tag is mentioned here at dt documentation 6.5.

Also, How are your user actions named? Can you help me out for naming the user actions esp. the Button clicks. I have tried giving the custom data attribute data-dtname on the anchor/button tags. But I see it is not working.

Apparently, documentation also states how the tag naming is scanned by DT Agent. But I am not sure how it works.

miguel_martinez
Advisor

Hello Rajesh. If you are instrumenting a hybrid application, can I suggest using the Cordova plugin? I have used it a few times now and so far it has been the easiest way to instrument a Hybrid application automatically. Here the link to the Dynatrace-Cordova-Plugin. Let me know if you decide to take this route.

Good luck!

Miguel

Hi Miguel, Thanks for valuable suggestion. However I would avoid taking this path as of now. I would I would definitely check it out. Regards, Rajesh.

Hi Miguel, just by chance, do you have an AppMon dynatrace.config file?

Thank you Roberto

Hi all, I think the plugin pages should be re-opened for comments so that we can communicate the plugin author directly. It is currently closed for comments.

miguel_martinez
Advisor

Hello Rajesh, all you need to do is to add the <plugin> tags inside your project's config.xml, and modify necessary parameters (application name, System Profile name, DT Server hostname and port, etc.). You also need to make that you create a user that has the "Web Service Interface Access" permission, so that it can connect to the DT server's REST API usually via port 8020 and automatically download the JS agent. Take a look at the Github project for a more step-by-step guide on how to proceed. If you have any questions feel free to post a question about it 🙂
Best,

Miguel