AnalyticsManager
Public interface for interacting with the MobileAppMessaging Analytics features. Provides status checking and runtime analytics control.
The initial analytics state is seeded from the analyticsEnabled configuration parameter, but can be toggled at runtime via enableAnalytics / disableAnalytics. A runtime toggle overrides the configured value and persists across app sessions (backed by the SDK's runtime toggle manager) until it is changed again.
Functions
Indicates whether the MobileAppMessaging analytics are enabled or disabled. Reflects the runtime toggle if one has been set, otherwise the analyticsEnabled configuration parameter.
Disable analytics collection at runtime. Turns the analytics runtime toggle off and tears down the engagement/custom-event analytics so no further events are recorded. A subsequent enableAnalytics rebuilds them.
Enable analytics collection at runtime. Turns the analytics runtime toggle on and lazily builds the engagement/custom-event analytics if they were not initialized at SDK init time, so events dispatched after this call are processed rather than dropped.