optOut
The optOut property sets the opt-out flag for the entire app. When the opt-out flag is set, no data is collected.
By default optOut = false (the user is opted in and tracking is active). The value is persisted across app restarts and upgrades.
Syntax
PiwikTracker.sharedInstance()?.optOut = isOptOut[PiwikTracker sharedInstance].optOut = isOptOut;Parameters
- optOut
boolean, required- Whether a user has the opt-out flag set. True: is opted out. False: is opted in.
Examples
To set the opt-out flag and stop collecting data:
PiwikTracker.sharedInstance()?.optOut = true[PiwikTracker sharedInstance].optOut = YES;