Try it free

Download the JavaScript tag

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026
  • Early Access

Download the RUM JavaScript tag for a web frontend with the Dynatrace RUM API; it references external monitoring code and suits most use cases.

GETSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/rum/v1/manualInsertionTags/javaScriptTag/{id}

Overview

You use the id path parameter, the Smartscape FRONTEND ID, to download the JavaScript tag for a web frontend. The tag references an external file with the monitoring code and configuration and updates dynamically, so it's recommended for most use cases. The optional scriptExecutionAttribute and crossOriginAnonymous query parameters set the async, defer, or crossorigin attributes. A 200 response returns the tag, which you add to your pages to enable Real User Monitoring.

Authentication

To execute this request, you need a platform token or OAuth access token with rum:manual-insertion-tags:read scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

Smartscape FRONTEND id.

pathRequired
scriptExecutionAttributestring

Specifies the script execution attribute: async, defer, or none. If specified, this overrides the configured value.

The element can hold these values
  • ASYNC
  • DEFER
  • NONE
queryOptional
crossOriginAnonymousboolean

Indicates whether to add the crossorigin="anonymous" attribute to the tag. If specified, this overrides the configured value.

queryOptional

Response

Response codes

CodeTypeDescription
200string

Success. The response contains the JavaScript tag.

400ErrorEnvelope

Bad request.

404ErrorEnvelope

Frontend not found.

4XXErrorEnvelope

Client error.

5XXErrorEnvelope

Server error.

Response body objects

The ResponseBody object

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}
Related tags
Platform APIDynatrace Platform