- 3 Minutes to read
- Print
- DarkLight
Global Configuration
- 3 Minutes to read
- Print
- DarkLight
Configuration Options
We strongly recommend enabling batch support and client timestamps with iOS SDK, because using these settings will increase data quality. Batch support can be enabled via the SDK, and client timestamp is an account configuration that can be enabled by your account manager.
MappIntelligence.shared()?.initWithConfiguration([123451234512345], onTrackdomain: "https://your-trackdomain.net", andWithEverID: "customEverID")
MappIntelligence.shared()?.logLevel = .all
MappIntelligence.shared()?.requestInterval = 1*60
MappIntelligence.shared()?.requestPerQueue = 100
MappIntelligence.shared()?.batchSupportEnabled = true
MappIntelligence.shared()?.batchSupportSize = 150
MappIntelligence.shared()?.sendAppVersionInEveryRequest = true
MappIntelligence.shared()?.enableBackgroundSendout = true
MappIntelligence.shared()?.shouldMigrate = true
MappIntelligence.shared()?.enableUserMatching = true
Attribute | Description | Default |
---|---|---|
trackIDs | Mandatory. The track id is used to generate the correct request URL. | blank |
trackDomain | Mandatory. The tracking domain is used to generate the correct request URL | blank |
andWithEverID | Optional. If set, the SDK initialises with the given everID instead of generating a new one automatically. | blank |
requestInterval | Optional. This parameter defines the periodic time for sending the cached tracking data to the Webtrekk server. This is set to 15 min by default. If you want a different transmission interval, you can overwrite the default setting here. The maximum interval possible is 60 minutes, the minimum is ~5 seconds. Request interval value is in seconds. The requests are sent when the app is in the foreground or background. Additionally, the SDK automatically sends requests on the following actions:
| 15 |
requestPerQueue | Optional. If batch support is disabled, you can specify the number of requests to be saved in the queue. RequestTimeout has priority: If the TimeOut will have been reached before the number of possible requests has been reached, the SDK will send the currently stored requests to Mapp Intelligence. | 100 |
batchSupportEnabled | Optional. When batch support is enabled, the requests are sent to the server in batches instead of individually. It is recommended to enable batch support, see batch support. | disabled |
batchSupportSize | Optional. When batch support is enabled, you can adjust the number of requests per batch. The maximum number of requests per batch allowed is 10000. | 5000 |
logLevel | Optional. Used to log data generated by the SDK for debugging purposes. We do not recommend enabling it in production. Possible values are:
| none |
enableCrashTracking | Optional. Supports various types of crash tracking:
Also check documentation on crash tracking here. | noneOfExceptionTypes |
sendAppVersionInEveryRequest | Set this configuration to true if you want to send the pre-defined app version parameter in every request. If false, the app version will be sent only in the first request of the session as detected by the SDK. | false |
enableBackgroundSendout | Enable if you want the SDK to be able to send requests even when the app is in the background. Please note that this requires additional approval from apple. | false |
shouldMigrate | Use this if you are migrating from iOS SDK v4 to iOS SDK v5. Please follow the instructions as given in the documentation in that case: Migrate from iOS SDK version 4 | false |
enableUserMatching | Enables user matching in between the Engage and Intelligence for better targeting. Only use if you are also using the Engage SDK for user interaction. For more information see iOS User Matching. | false |
Example
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
MappIntelligence.shared()?.initWithConfiguration([123451234512345], onTrackdomain: "https://your-trackdomain.net", andWithEverID: "137628356473829")
MappIntelligence.shared()?.logLevel = .all
MappIntelligence.shared()?.requestInterval = 1*60
MappIntelligence.shared()?.requestPerQueue = 100
MappIntelligence.shared()?.batchSupportEnabled = true
MappIntelligence.shared()?.batchSupportSize = 150
MappIntelligence.shared()?.shouldMigrate = false
MappIntelligence.shared()?.sendAppVersionInEveryRequest = true
MappIntelligence.shared()?.enableBackgroundSendout = true
MappIntelligence.shared()?.enableCrashTracking(.allExceptionTypes)
return true
}
}
[[MappIntelligence shared] initWithConfiguration: @[@111111111111111, @222222222222222] onTrackdomain:@"https://your-trackdomain.net" andWithEverID:@"137628356473829"];
[[MappIntelligence shared] setLogLevel:all];
[[MappIntelligence shared] setRequestTimeout:1*60];
[[MappIntelligence shared] setBatchSupportSize:150];
[[MappIntelligence shared] setBatchSupportEnabled:YES];
[[MappIntelligence shared] setEnableBackgroundSendout:YES];
[[MappIntelligence shared] setShouldMigrate:YES];
[[MappIntelligence shared] setEnableCrashTracking:allExceptionTypes];