# Turn on/off RUM conditionally

**URL:** <https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic\
**Created:** [November 20, 2020, 4:25pm UTC](https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692 "2020-11-20T16:25:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Abil](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@Tim\_Abil](https://community.dynatrace.com/u/Tim_Abil)\
**Post date:** [November 20, 2020, 4:25pm UTC](https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692/1 "2020-11-20T16:25:56Z")

</div>

Our application redirects users to a login page thats on another domain. So our bounce rate is being significantly skewed since landing on the main page initializes RUM, registers a single “visit” action and redirects immediately to the login page; and DT counts that as a bounce. We’d like to turnoff all of monitoring until the user is authenticated so that the bounce rate is calculated properly. From the dtrum documentation I see two potential candidates _dtrum.setAutomaticActionDetection()_ and/or _dtrum.enable()/disable()_. However it’s not clear whether either of those will actually turn off the reports related to bounce rate.

---

<div class="post-metadata">

**Author:** ![Joe\_Hoffman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joe_hoffman/32/30752_2.png) [@Joe\_Hoffman](https://community.dynatrace.com/u/Joe_Hoffman)\
**Post date:** [November 20, 2020, 4:55pm UTC](https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692/2 "2020-11-20T16:55:27Z")

</div>

I think you’re on the right track. If RUM is not enabled automatically, and you manually enable it using dtrum.enable(), then you can control when RUM starts. The downside is that you will loose visibility into the page activities prior to enabling RUM.

---

<div class="post-metadata">

**Author:** ![Tim\_Abil](https://avatars.discourse-cdn.com/v4/letter/t/ee7513/32.png) [@Tim\_Abil](https://community.dynatrace.com/u/Tim_Abil)\
**Post date:** [November 20, 2020, 7:25pm UTC](https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692/3 "2020-11-20T19:25:48Z")

</div>

[@Joe H.](https://answers.dynatrace.com/users/3021/view.html) Do you think if we manually report more than 1 single user action during the main page load, it would make DT not count that session as bounced?

---

<div class="post-metadata">

**Author:** ![Joe\_Hoffman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joe_hoffman/32/30752_2.png) [@Joe\_Hoffman](https://community.dynatrace.com/u/Joe_Hoffman)\
**Post date:** [November 20, 2020, 7:43pm UTC](https://community.dynatrace.com/t/turn-on-off-rum-conditionally/11692/4 "2020-11-20T19:43:03Z")

</div>

The definition of a bounce is a visit with a single user action. So yes I think you are right, manually report a second user action and that should eliminate the false bounces. But you will still have two sessions for that user, one from the landing page, the other from the login onwards.
