IMO the question here is what you are using for web server and check if its capable to inject RUM
From Technology support — Dynatrace Docs
If the answer is yes I would follows Web applications: Issues with RUM JavaScript remarkable post by @maliborskaya
HTH
Yos

