Set up agentless RUM in the New RUM Experience

  • Latest Dynatrace
  • How-to guide
  • Published Oct 29, 2025
  • Preview

As covered in Find the suitable instrumentation approach, agentless RUM is the appropriate choice for scenarios where:

  • You don’t have access to the web server, or your technology doesn’t support automatic injection.
  • You do have access to the application code.

Once you’ve confirmed these conditions, follow the steps below to set up agentless RUM.

Step 1 Create a frontend

To create a frontend for agentless RUM

  1. Go to Experience Vitals Experience Vitals.
  2. Select Frontend to start the Frontend creation wizard.
  3. In the Start monitoring step, select the frontend type Web and provide a frontend name.
  4. In the Select instrumentation method step, select Agentless.
  5. In the Create your new frontend step, select Create.
  6. In the Setup step, check under Enablement and cost control if New Real User Monitoring Experience is enabled. If it isn’t enabled, select Override and turn it on.
  7. Under Copy JavaScript tag, select to copy the RUM JavaScript to the clipboard.

The provided RUM JavaScript has the JavaScript tag snippet format. This format is recommended for most scenarios because it ensures automatic updates. With this snippet, the monitoring code loads and executes synchronously.

Step 2 optional Select and configure the snippet format optional

The New RUM Experience provides several snippet formats to meet different requirements. For details on the available formats and their configurability, see Select a snippet format in the New RUM Experience. For each snippet format, an API endpoint is available.

To get the different snippet formats in the UI

  1. Go to Experience Vitals Experience Vitals.
  2. Select Web to view all web frontends.
  3. Select the frontend you want to instrument.
  4. On the Settings tab, select Manual insertion.
  5. Scroll to the section for the snippet format you want to use. Then select to copy the RUM JavaScript to the clipboard.

Step 3 Insert the RUM JavaScript

Add the RUM JavaScript to the <head> element of every HTML page you want to monitor, and make sure it’s the first executable script on the page.

The example below shows a simple HTML page before and after inserting the RUM JavaScript.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<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>
</body>
</html>
</html>

Use of template files

For websites that use frameworks or systems with templating, you can usually add custom JavaScript to all pages by placing it in a shared template file—commonly named header.html or similar. These files are typically included automatically in every page during server-side rendering or static site generation. If your site architecture supports centralized templates, use this approach to insert the RUM JavaScript snippet.

Use of tag managers

When using tag managers, it can be difficult to guarantee that the RUM JavaScript is the first executable script on the page. If you cannot ensure this, you may lose information—such as certain timings or user events—that are only available when both the RUM monitoring code and the configuration are fully loaded and initialized.

This constraint is more pronounced if you configure the script execution option of the JavaScript tag, OneAgent JavaScript tag, or OneAgent JavaScript tag with SRI to async or defer.

Step 4 Keep the RUM JavaScript up-to-date

If you inserted the RUM JavaScript using the JavaScript tag snippet format, the monitoring code and configuration update automatically. For other snippet formats, you need to update the RUM JavaScript whenever the configuration changes.

The recommended approach is to integrate the snippet insertion into your build process using the RUM manual insertion tags API. This ensures your application consistently runs with the latest configuration.

Related tags
Digital Experience