AnalyticsManager

AnalyticsManager

Manage SDK analytics settings and track events.

Members

associatedIdentifiers :AssociatedIdentifiersManager

List or edit the associated custom identifiers.

Type:
Example
// list the associated custom identifiers
await sdk.analytics.associatedIdentifiers.list()
// create an editor for the associated custom identifiers
const editor = sdk.analytics.associatedIdentifiers.edit()

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')