AppPanel
AnalyticsiOS Setup

Configuration

Configure autocapture and opt-out behavior.

Autocapture

By default, the SDK automatically tracks session and app lifecycle events. You can control this:

// Only track sessions, disable lifecycle events
AppPanel.shared.analytics.autocapture = .sessions

// Disable all autocapture
AppPanel.shared.analytics.autocapture = []

// Re-enable everything (default)
AppPanel.shared.analytics.autocapture = .all

Set this before tracking any events.

Session timeout

A new session starts when the app has been in the background for longer than the timeout. Default is 5 minutes (300 seconds).

AppPanel.shared.analytics.sessionTimeout = 600 // 10 minutes

Opt out

Disable all analytics data collection:

AppPanel.shared.optOut = true

This also disables logging. Set it back to false to resume.

On this page