# Resolve issues where RUM injection is breaking a web application

**URL:** <https://community.dynatrace.com/t/resolve-issues-where-rum-injection-is-breaking-a-web-application/43661>\
**Category:** Troubleshooting\
**Tags:** real-user-monitoring-classic\
**Created:** [January 17, 2024, 10:03am UTC](https://community.dynatrace.com/t/resolve-issues-where-rum-injection-is-breaking-a-web-application/43661 "2024-01-17T10:03:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![toufic\_chamandi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/toufic_chamandi/32/4356_2.png) [@toufic\_chamandi](https://community.dynatrace.com/u/toufic_chamandi)\
**Post date:** [January 17, 2024, 10:03am UTC](https://community.dynatrace.com/t/resolve-issues-where-rum-injection-is-breaking-a-web-application/43661/1 "2024-01-17T10:03:20Z")

</div>

_Summary: Occasionally, after enabling RUM, a website may experience issues. This article explains how to identify the problem and outlines the necessary configuration steps to resolve it._

## 

Problem

You’ve just turned on RUM (automatic or manual injection), and you start noticing that your website is affected, possibly with some buttons not working or the website loading incorrectly.

## **Troubleshooting steps**

### **Is it a RUM issue?**

To check, there is a simple test to be done at the start, which is blocking the ruxitagent request in the network tab and reloading the page. Right-click on the request, select ‘Block Request URL’, and then reload the page. The ruxitagent request should appear as blocked. If the issue persists, then this is an agent issue related to the technology and not a RUM issue, but if the problem is not there anymore, continue following the guide:

 ![toufic_chamandi_0-1709107438801.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/b/cb31d541f337ce3e0a249b15a07a1d746b4ebccf.png)

#### Change the injection point

The first step is to change where the injection is placed. We recommend the following:

- Inject after \<head\>
- Inject after \<body\>
- Inject before \</body\>

**Note:&nbsp;For manual injection, there is no way to change the location through the UI; you need to change it in the source code.**

For automatic injection, go to: Applications → example\_app → settings → Injection.

 ![toufic_chamandi_0-1705482442794.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/3/03bb0cfd79e43dfb1c9622e580558861e71fc746.png)

#### Change the capturing settings

If after changing the injection location, the issue still persists, then it might be a functionality issue. Here are some steps to take so that the problem can be narrowed down (if you’re using manual injection, please check the note at the bottom of this article before continuing).

- Go to Applications → example\_app → settings → Capturing → Async web requests and SPAs, disable the settings on that page and wait for 10 minutes, and check if the issue persists on the website:

 ![toufic_chamandi_1-1705484168439.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/1/a1d17f369f439f2caf63151b2cc4ff9e6cb55978.png)

- **If the issue is gone,** then re-enable the settings one by one while testing the website, so that way you can pinpoint what setting is causing the problem.

- **If the issue persists** , re-enable the previous settings&nbsp; and go to&nbsp;Applications → example\_app → settings → Capturing → Content capture and disable the settings there and wait for 10 minutes, and check if the issue persists on the website:

 ![toufic_chamandi_2-1705484302741.png](https://global.discourse-cdn.com/dynatrace/original/2X/f/ff19e8130d14f16d99b61b03a758dedea3943201.png)

- **If the issue is gone,** then re-enable the settings one by one while testing the website, so that you can pinpoint what setting is causing the problem.
- Go to Applications → example\_app \> Settings \> General Settings \> Enablement and cost control \> disable “Enable Session Replay”
- Go to&nbsp;Applications → example\_app \> Settings \> Behavior analytics \> Usability analytics \> disable “Detect Rage Clicks”

#### **The behavior only affects XHRs**

If the behavior only affects XHRs, then enable “Use Proxy API for XHRs”, wait a few minutes for the changes to take effect, and then check if the issue is resolved.

**Note:**  **For**  **manual injection, some injection formats don’t automatically apply settings changes made on the UI. When making a change in the settings,** &nbsp; **you need to replace the line of code that you inserted with the newly generated one.**

## What’s next

If, after performing the above, the issue is still occurring, open a chat or contact support and provide

- a [HAR file](https://community.dynatrace.com/topic/223391)
- a screenshot of the console (if an error is generated there)
- If possible, record a small video of the behavior
- the troubleshooting steps you have already tried

**What to read next:**

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[How to generate a HAR file](https://community.dynatrace.com/topic/223391)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Configure automatic injection](https://docs.dynatrace.com/docs/shortlink/rum-injection)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Set up agentless Real User Monitoring](https://docs.dynatrace.com/docs/shortlink/agentless-rum)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Troubleshooting RUM setup issues for web applications](https://community.dynatrace.com/topic/239643)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[Troubleshooting automatic RUM injection failures](https://community.dynatrace.com/topic/287116)

![HannahM_0-1769097109026.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/b/eb6d9d4379a236243b3b08861f33a5d309710d6d.png)  
[RUM Application traffic is not captured by Dynatrace](https://community.dynatrace.com/topic/263922)

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [January 17, 2024, 10:12am UTC](https://community.dynatrace.com/t/resolve-issues-where-rum-injection-is-breaking-a-web-application/43661/2 "2024-01-17T10:12:00Z")

</div>

Thank you!
