Opt-Out of Data Tracking
To disable data tracking by the SDK use disableDataTracking() method as shown below. Once you have opted out of data tracking you need to explicitly opt-in to start tracking any event OR attributes for the user.
MoEngageSDKAnalytics.sharedInstance.disableDataTracking() //Opt out
MoEngageSDKAnalytics.sharedInstance.enableDataTracking() //Opt in
[[MoEngageSDKAnalytics sharedInstance] disableDataTracking]; //Opt out
[[MoEngageSDKAnalytics sharedInstance] enableDataTracking]; //Opt in
IDFA and IDFV OptOuts
SDK tracks IDFA(Advertising Identifier) by default as a UserAttribute, it's tracked only if the AdSupport framework is included in the project and if the User has not limited Ad Tracking. In case you would want to opt-out of IDFA Tracking call the opt-out method as shown below:
MoEngageSDKAnalytics.sharedInstance.disableIDFATracking() //Opt out
MoEngageSDKAnalytics.sharedInstance.enableIDFATracking() //Opt in
[[MoEngageSDKAnalytics sharedInstance] disableIDFATracking]; //Opt out
[[MoEngageSDKAnalytics sharedInstance] enableIDFATracking]; // Opt in
SDK also tracks IDFV(Identifier for Vendor) by default as a device Identifier. In case you would want to opt-out of IDFV Tracking call the opt-out method as shown below:
MoEngageSDKAnalytics.sharedInstance.disableIDFVTracking() //Opt out
MoEngageSDKAnalytics.sharedInstance.enableIDFVTracking() //Opt in
[[MoEngageSDKAnalytics sharedInstance] disableIDFVTracking]; //Opt out
[[MoEngageSDKAnalytics sharedInstance] enableIDFVTracking]; //Opt in
IDFA and IDFV opt-outs are available from SDK version 6.1.1
Enable/Disable SDK
If you don't want the MoEngage SDK to track any user information or send any data to the MoEngage System use the below method:
MoEngage.sharedInstance.disableSDK()
[[MoEngage sharedInstance] disableSDK];
Once this API is called all the SDK APIs will be non-operational. SDK will be disabled until enableSDK() is called.
Once you have the user's consent use the below API to enable the SDK.
MoEngage.sharedInstance.enableSDK()
[[MoEngage sharedInstance] enableSDK];
Enable/Disable SDK methods are available from SDK version 6.3.0.