Configure Global Tracking

Prev Next

Purpose of global configuration

Global configuration defines how the SDK behaves after initialization. Use it to set app-wide defaults for logging, request delivery cadence, batch support, crash tracking, background sending, and selected identity-related features.

When to configure it

Apply global configuration immediately after calling initWithConfiguration(...), in the same place where you initialize the SDK (AppDelegate or your @main App). This keeps startup behavior predictable and avoids scattering SDK behavior across the app.

How to think about this step

This page is about startup-level defaults, not about later runtime operations. Start with the smallest stable configuration that fits your app, then add only the options your implementation really needs.

Minimal example

MappIntelligence.shared()?.initWithConfiguration(
    [123451234512345],
    onTrackdomain: "https://your-trackdomain.com"
)
[[MappIntelligence shared]
    initWithConfiguration:@[@123451234512345]
            onTrackdomain:@"https://your-trackdomain.com"];

Common extended example

MappIntelligence.shared()?.initWithConfiguration(
    [123451234512345],
    onTrackdomain: "https://your-trackdomain.com"
)
MappIntelligence.shared()?.logLevel = .all
MappIntelligence.shared()?.requestInterval = 15 * 60        // seconds (default)
MappIntelligence.shared()?.batchSupportEnabled = true
MappIntelligence.shared()?.batchSupportSize = 150
MappIntelligence.shared()?.enableBackgroundSendout = true
MappIntelligence.shared()?.enableCrashTracking(.allExceptionTypes)
[[MappIntelligence shared]
    initWithConfiguration:@[@123451234512345]
            onTrackdomain:@"https://your-trackdomain.com"];
[[MappIntelligence shared] setLogLevel:all];
[[MappIntelligence shared] setRequestInterval:15 * 60];     // seconds (default)
[[MappIntelligence shared] setBatchSupportEnabled:YES];
[[MappIntelligence shared] setBatchSupportSize:150];
[[MappIntelligence shared] setEnableBackgroundSendout:YES];
[[MappIntelligence shared] enableCrashTracking:allExceptionTypes];
  • Logging: use .all while integrating, then reduce to .warning or .none for production.

  • Request interval: keep the 15-minute default unless you have a concrete reason to change it. The minimum is ~5 seconds, the maximum is 60 minutes.

  • Batch support: enable for production apps to lower bandwidth consumption. See Send Tracking Data in Batches.

  • Background sending: enable only if your use case requires it; this requires Apple approval at submission time.

  • Crash tracking: decide deliberately whether crash data belongs in your analytics setup. See Crash Tracking.

  • Identity and privacy: enable migration, user matching, anonymous tracking, or custom everID handling only when your use case explicitly requires them.

What belongs here and what does not

This page covers app-wide startup configuration. Runtime operations such as opt-out, changing track IDs and domains during runtime, or forcing immediate send belong in Runtime & Privacy.

Configuration options reference

Available properties on MappIntelligence.shared():

Property

Description

Default

requestInterval

Periodic interval in seconds for sending cached tracking data to the Mapp Intelligence server. Minimum ~5 seconds, maximum 60 minutes. Requests are also sent on app open and app close.

15 * 60 (15 min)

batchSupportEnabled

When enabled, requests are sent in batches instead of individually. Recommended for production. See Send Tracking Data in Batches.

false

batchSupportSize

Maximum number of requests per batch when batch support is enabled. Hard limit: 10000.

5000

logLevel

SDK log verbosity. Possible values: .none, .all, .debug, .warning, .error, .fault, .info. Not recommended in production.

.none

enableBackgroundSendout

Allow the SDK to send requests while the app is in the background. Requires additional approval from Apple.

false

sendAppVersionInEveryRequest

If true, the app version parameter is included in every request. If false, only in the first request of each session.

false

shouldMigrate

Set to true when migrating from iOS SDK v4 to v5 to preserve existing everID data. See Migrating from SDK v4 to v5.

false

anonymousTracking

When true, the SDK suppresses identifiers that allow user-level recognition. See Anonymous Tracking.

false

enableUserMatching

Enables matching between Engage and Intelligence. Only use together with the Engage SDK. See User Matching.

false

enableCrashTracking(_:) (method)

Enables crash tracking with a given exception type filter (.allExceptionTypes, .uncaught, .caught, .custom, .uncaught_and_caught, .uncaught_and_custom, .custom_and_caught, .noneOfExceptionTypes). See Crash Tracking.

.noneOfExceptionTypes

Removed: The requestsPerQueue property was removed in version 5.1.0 (SDK-1703) and is no longer available. Use batchSupportEnabled together with batchSupportSize instead.

What this step should achieve

After this step, your SDK setup should be stable enough that you can move into tracking implementation without revisiting the startup flow.

Next step

Continue with the tracking implementation that fits your app — start with Pages for screen tracking, or browse Tracking for the full set of tracking topics.