How do I set up agentless real user monitoring?

Normally you benefit from real user monitoring only after you’ve installed Dynatrace OneAgent. The manual approach to setup described here—otherwise known as agentless real user monitoring—should only be used for installations where you aren’t able to start deep monitoring, for example because you have no Dynatrace OneAgent installed on your web server machine.

Before you begin:

  • Keep in mind that you’ll need to manually insert a JavaScript tag into each of your application’s pages.
  • You may find it challenging to insert the JavaScript tags in the right places (this is something that Dynatrace OneAgent handles automatically).
  • The JavaScript tags embedded in your application’s pages will not be automatically updated if you change application monitoring settings—you’ll need to update the tags manually (this is something that Dynatrace OneAgent handles automatically).

What you’ll need:

  • Access to your application’s HTML source so that you can insert the JavaScript tags.
  • Custom JavaScript tag generated by Dynatrace.

Enable real user monitoring without installing Dynatrace OneAgent

Note: Agentless monitoring is appropriate for environments where you can’t install an agent on your web server. If you do have web server access, it’s recommended that you use the standard monitoring setup instead.

Add an application to your Dynatrace environment by selecting Set up agentless monitoring from the menu.
Note: If you already have an application set up for agentless monitoring, you can skip steps 2 & 3 below by copying an existing JavaScript snippet. To do this, click the copy an existing JavaScript tag link to view the list of currently set up applications and corresponding JavaScript snippets. This is useful if you’ve already added real user monitoring code to some of your pages and want to extend monitoring visibility to other pages.

Type in your application’s domain name.

Click Add web application
A custom JavaScript tag for your application is then displayed.

Select and copy your application’s custom JavaScript tag to the clipboard.

Paste the JavaScript tag from the clipboard into each of your application’s HTML pages that you want to monitor.

  • The script tag must be placed as the first JavaScript file in the page.
  • The script tag is updated each time you make a change to your application’s settings, so be sure that you insert the current version of the tag.

Dynatrace waits for you to modify your pages’ code and then to see traffic on the website. You can finish here or wait to see if everything’s fine.

Once page code changes have been deployed, you should begin to see monitoring data within a few minutes.

Example: simple page code before and after real user monitoring tag insertion

Before injection

<html>
<head>
    <title>MyApp</title>
    <script type="text/javascript" src="myapp.js"></script>
</head>

<body>

<form>
    Username: <input type="text name="username"/><br/>
    Password: <input type="password" name="password"/><br/>
    <input type="submit" value="Login">
</form>

After injection

<html>
<head>
    <title>MyApp</title>
    <script type="text/javascript" src="//js-cdn.dynatrace.com/jstag/145e12d594f/ruxitagentjs_2nr_1006400120011129.js" data-dtconfig="tp=500,50,0,0,10"></script>
    <script type="text/javascript" src="myapp.js"></script>
</head>

<body>

<form>
    Username: <input type="text name="username"/><br/>
    Password: <input type="password" name="password"/><br/>
    <input type="submit" value="Login">
</form>