Indicates whether RUM JavaScript is currently enabled, taking into account the opt-in mode settings and the
current opt-in (consent) state.
Returns boolean
true if RUM JavaScript is enabled, otherwise false.
Example
// Skip expensive computation when the agent is not collecting data if (dynatrace.isEnabled()) { constpayload = buildExpensiveAnalyticsPayload(); dynatrace.sendEvent(payload); }
Indicates whether RUM JavaScript is currently enabled, taking into account the opt-in mode settings and the current opt-in (consent) state.