I’m using AmplitudeSwift SDK to my iOS app. I have a toggle in the app to allow users to opt out the analytics. The SDK document states it should be as simple as setting optOut = true.
let amplitude = Amplitude(<br /> configuration: Configuration(<br /> apiKey: AMPLITUDE_API_KEY,<br /> optOut: true<br /> )<br />)
However, I implemented the constructer in my code to respect user preferences.
private init() {<br /> let analyticsEnabled = UserDefaults.standard.bool(forKey: "analyticsEnabled")<br /> amplitude = Amplitude(configuration: Configuration(<br /> apiKey: Constants.amplitudeKey,<br /> optOut: !analyticsEnabled<br /> ))<br /> }
It works that manual trackings are stopped, but I can still receive the anonymous session tracks on my dashboard. Is it expected? How can I entirely opt out the user in that case?
