It is possible for the user to opt-out of tracking. For this purpose, the SDK provides an opt-out option. Calling this method will prevent the SDK to store or send any future user activity to Mapp Intelligence. If needed, it is possible to send one final request with the currently stored requests to Mapp Intelligence before the user is opted-out of tracking completely. The user can also opt-in to tracking.

Methods

// Opt-out and delete currently saved tracking data
MappIntelligence.shared()?.optOutAndSendCurrentData(false)

// Opt-out and send currently saved tracking data to trackserver
MappIntelligence.shared()?.optOutAndSendCurrentData(true)

// Opt-in
MappIntelligence.shared()?.optIn()
JAVA
MethodDescription
MappIntelligence.shared()?.optOutAndSendCurrentData(false)Stops tracking without sending any tracking data to Mapp Intelligence.
MappIntelligence.shared()?.optOutAndSendCurrentData(true)Stops tracking and sends the currently saved tracking data to Mapp Intelligence.
MappIntelligence.shared()?.optIn()Starts tracking as configured in the Global Configuration.

Example iOS

// Enable opt-out and delete currently stored tracking data without sending.
@IBAction func optOutFull(_ sender: UIButton) {
    MappIntelligence.shared()?.optOutAndSendCurrentData(false)
}
 
// Enable opt-out and send currently stored tracking data to Mapp Intelligence
@IBAction func optOutSend(_ sender: Any) {
    MappIntelligence.shared()?.optOutAndSendCurrentData(true)
}
 
// opt-in / start tracking
@IBAction func OptIn(_ sender: UIButton) {
    MappIntelligence.shared()?.optIn()
}
JAVA
// Enable opt-out and delete currently stored tracking data without sending.
[[MappIntelligence shared] optOutAndSendCurrentData:NO];
 
// Enable opt-out and send currently stored tracking data to Mapp Intelligence
[[MappIntelligence shared] optOutAndSendCurrentData:YES];
 
// Disable opt-out / start tracking
[[MappIntelligence shared] optIn];
JAVA