Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I control JavaScript injection according to user-agent?


I am using real user monitoring (RUM) on a certain site.

The site has access from smartphone and feature phone.

- SmartPhone Site: use JavaScript

- Feature Phone Site : not use JavaScript

The smartphone site and the feature phone site are the same domain.

I want to prevent JavaScript from being inserted on Feature Phone Site.

Can I control JavaScript injection according to user-agent?

Best Regards.



Hi Masahiko,

I don't think that's supported out-of-the-box. The only way to configure JS Injection is by URL:

You just talked about the domain. Is there any other part of the URL where those two use-cases are different?

If that's not the case, you can also try disabling the agent via Javascript. In JS you should be able to determine which device you are on and if it's a feature phone you could call dtrum.disable()

best regards

Dynatrace Guru
Dynatrace Guru

Not sure if it will help here but you can also include based on browser/device type and version:

The above is under the advanced setup for a specific applications settings.