AnalyticsManager

AnalyticsManager

Manage SDK analytics settings and track events.

Members

isEnabled :function

Gets the analytics enabled value for the current browser.

Type:
  • function
Example
const enabled = await sdk.analytics.isEnabled()
if (enabled) {
  // perform analytics tracking
}

setEnabled :function

Enables or disables analytics for the current browser.

Type:
  • function
Example
// disable analytics
await sdk.analytics.setEnabled(false)
// enable analytics
await sdk.analytics.setEnabled(true)

trackScreen :function

Tracks a screen has been viewed in your website or web application.

Type:
  • function
Example
await sdk.analytics.trackScreen('Home')