Babar Q. avatar image
Babar Q. asked ·

JavaScript tag vs. OneAgent JavaScript tag

Dear All,

I am curious to know the main difference and benefits of each JavaScript tag on each other after reading the below statements:

  • The most versatile format is a simple JavaScript tag that downloads the monitoring code.
  • Use the same JavaScript tag that is inserted automatically by Dynatrace OneAgent.



10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Radu S. avatar image
Radu S. answered ·

Hi Babar,

In the context of Agentless RUM (Real User Monitoring) these are two of the 4 possible option of performing the JavaScript instrumentation to enable performance monitoring of that application. Let's look at both of these in a bit more detail:

1. JavaScript Tag

  • a <script> tag that you can insert into the "<head>" section of your application's html pages so that instrumentation of the app can happen and you can track performance
  • The tag usually has a link from where the actual JavaScript content is downloaded
  • The downloaded JavaScript is larger, and complete with application configuration (the settings that were set from the Dynatrace environment)
  • When using this option, you also select a time period that the JavaScript configuration gets updated (e.g. every hour). And so when you make changes to the application settings/setup, you don't have to modify anything in your tag, it will automatically pick up the new configuration changes

2. JavaScript OneAgent Tag

  • this option uses the same JS tag that the OneAgent injects.
  • Again, the tag has a link to download the actual JavaScript content from, but the content downloaded is smaller. It will not contain details of the monitoring configuration.
  • This tag has another attribute called "data-dtconfig" and this is what contains the monitoring settings (as defined from the Dynatrace environment).
  • Because the monitoring settings are present in the tag itself, every time you make a change you have to generate a new tag with the new settings and update it everywhere yourself.
  • The OneAgent uses this tag because the OneAgent does the injection automatically and can update the details instantly. However, because here we are talking about Agentless RUM, even though you are using the same tag as the OneAgent, you must do all the work that the OneAgent does during normal RUM (i.e. generate new tag, and replace the old one with it)

In summary:

Option 1:

  • PROs: No need to edit the HTML and Applications every time when you make a change
  • CONs: You need to wait for your 'refresh period' to happen so that new settings are applied

Option 2:

  • PROs: If you're happy to make changes to HTML, you can have changes to monitoring settings be applied instantly!
  • CONs: Every time you make changes you need to update the tag yourself.

Best regards,


1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hello @Radu S.

Thank you for the elaboration. Now it is clear to me that basically, these four options are for the agentless monitoring perspective instead of the auto instrumentation, which is done by the OneAgent.



1 Like 1 · ·

Space Topics

mobile monitoring dotnet synthetic monitoring reports iis chat kubernetes servicenow amazon web services mysql mainframe rest api errors cassandra dashboard oneagent sdk cmc application monitoring openkit smartscape request attributes monitoring developer community user tagging log monitoring services ufo syntheticadvisory activegate ip addresses auto-detection high five award oracle hyperion webserver uem usql iib test automation license web performance monitoring ios news migration management zones index ibm mq web services custom event alerts notifications sso host monitoring knowledge sharing reports browser monitors java hybris sap vmware maintenance window user action naming javascript appmon ai synthetic classic availability tipstricks automation extensions session replay diagnostic tools permissions davis assistant faq documentation problem detection http monitors server easytravel apdex aws-quickstart network docker tags and metadata cloud foundry google cloud platform synthetic monitoring process groups account usability dynatrace saas gui paas openshift key user actions administration user actions postgresql synthetic locations oneagent security Dynatrace Managed user management custom python technologies mongodb openstack user session monitoring continuous delivery citrix configuration alerting NGINX action naming linux nam installation masking error reporting database mission control jmeter recorder apache mobileapp RUM php threshold azure purepath davis scripting agent aix nodejs android