# Auto inject of DT Ruxitjs script not working

**URL:** <https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, dynatrace-saas, oneagent, javascript\
**Created:** [April 7, 2020, 10:03am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993 "2020-04-07T10:03:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [April 7, 2020, 10:03am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/1 "2020-04-07T10:03:50Z")

</div>

Hi All , I am facing a challenge is monitoring user experience of an application. In some pf the pages , ruxitjs is auto inserted, in many it is not. I am able to see dtcookie , dtsa etc in all these pages. Can someone suggest a troubleshooting step.

Thanks

Swati

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 7, 2020, 10:12am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/2 "2020-04-07T10:12:26Z")

</div>

Hi [@Swati B.](https://answers.dynatrace.com/users/20577/view.html)

Check documentation on [Why don’t I see my applications or monitoring data?](https://answers.dynatrace.com/questions/237504/auto-inject-of-dt-ruxitjs-script-not-working.html)

There you will find step by step checks

HTH

Yos

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [April 7, 2020, 10:25am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/3 "2020-04-07T10:25:46Z")

</div>

hi [@Yos N.](https://answers.dynatrace.com/users/3891/view.html) thanks for your reply. There is no troubleshooting step given in [Troubleshooting RUM Classic for web applications — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configuration/web-applications/troubleshooting/why-dont-i-see-my-applications-or-monitoring-data/) . in my application some pages dont have javascript tag injected.

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [April 7, 2020, 10:41am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/4 "2020-04-07T10:41:26Z")

</div>

I also observed unsual value of dtSa cookie . in other applications dtSa cookie has blank value. Is it an issue?  
 ![24488-1586256039397.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/9/59fa270c187a8c8a5dec84316c668fbd808d16e3.png)

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 7, 2020, 11:19am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/5 "2020-04-07T11:19:19Z")

</div>

Hi [@Swati B.](https://answers.dynatrace.com/users/20577/view.html)

Please scroll down on that page and look for the follows lines and open them one by one

 ![24512-1586258259413.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/6/369f59584867363ddb4380fd8012bab0ef8d4d41.png)

---

<div class="post-metadata">

**Author:** ![Domenico\_Bressi](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/domenico_bressi/32/7142_2.png) [@Domenico\_Bressi](https://community.dynatrace.com/u/Domenico_Bressi)\
**Post date:** [April 14, 2020, 11:06pm UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/6 "2020-04-14T23:06:30Z")

</div>

HI [@Swati B.](https://answers.dynatrace.com/users/20577/view.html)

i take same experience with some of my applications where HTML header was more then 1000 digit. in this case javascript injection did not work property or other javascript stay on top of the code. check to all tag are \<\>closed **\</\>**

In this case try to force Javascript injection in the configuration of your Dynatrace application. Try to put Script near \<head\> to be sure is the first think you load in the page

Application- edit

in Application settings

```auto
Setting--> advance setup-->JavaScript injection (section) --> add custom rules<br>example:  All pages ( After specific HTML <head> )

```

 ![24586-1586905282094.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/8/38f74bb7b9624bb08579da5ffb856b28865c1f69.png)

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [April 17, 2020, 8:42am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/7 "2020-04-17T08:42:50Z")

</div>

hi [@Yos N.](https://answers.dynatrace.com/users/3891/view.html) this article is not useful. There is no mention of troubleshooting steps in case JS is not injecting in pages. The first step [How can I confirm the JavaScript tag is injected correctly?](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configuration/web-applications/troubleshooting/why-dont-i-see-my-applications-or-monitoring-data/#expand-471how-can-i-confirm-the-javascript-tag-is-injected-correctly) holds true . There is no JS injected. But there are no further steps as what do to next.

---

<div class="post-metadata">

**Author:** ![SB\_12](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@SB\_12](https://community.dynatrace.com/u/SB_12)\
**Post date:** [April 17, 2020, 8:45am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/8 "2020-04-17T08:45:21Z")

</div>

Thanks [@Domenico B.](https://answers.dynatrace.com/users/29811/view.html) I will check the header and see if that is the issue.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [April 17, 2020, 9:03am UTC](https://community.dynatrace.com/t/auto-inject-of-dt-ruxitjs-script-not-working/18993/9 "2020-04-17T09:03:20Z")

</div>

Hi [@Swati B.](https://answers.dynatrace.com/users/20577/view.html)

[Here are](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/basic-concepts/rum-javascript-injection/#expand-368click-to-view-the-table-of-rules) the rules specify the criteria for determining a suitable location within an HTML document to inject the JavaScript tag.

Check if your pages compile with those rules.

 ![1587114071541.png](https://global.discourse-cdn.com/dynatrace/original/1X/e3832cd9b0725de3efc8a00b0678d480c2914035.png)

 ![24634-1587114113978.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/a/eaed193f1171535c56c70c8081fce9ae3c2e3597.png)

 ![24656-1587114147898.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/f/4fced525424ff62c52b441c2e455ec7bc8550093.png)

HTH

Yos
