Android Id Tracking
From SDK version 11.5.00, SDK optionally tracks Android-id for the devices(by default Android-id is not tracked). To enable Android-id tracking use the enableAndroidIdTracking() method as shown below.
import com.moengage.core.enableAndroidIdTracking
enableAndroidIdTracking(context)
MoESdkStateHelper.enableAndroidIdTracking(context);
Before enabling the Android-id tracking application should take consent from the user as per the Google Policy.
Once tracking is enabled SDK would continue tracking the Android-id until explicitly opted-out. Use the disableAndroidIdTracking() method to opt-out of Android-id tracking.
import com.moengage.core.disableAndroidIdTracking
disableAndroidIdTracking(context)
MoESdkStateHelper.disableAndroidIdTracking(context);
For the SDK version below 11.5.00 use the TrackingOptoutConfig while initializing the MoEngage SDK.
Advertising Identifier Tracking
From SDK version 12.1.00, SDK optionally tracks Advertising Identifier for the devices(by default Advertising Identifier is not tracked). To enable Advertising Identifier tracking use the enableAdIdTracking() method as shown below.
import com.moengage.core.enableAdIdTracking
enableAdIdTracking(context)
MoESdkStateHelper.enableAdIdTracking(context);
Before enabling the Advertising Identifier tracking application should take consent from the user as per the Google Policy.
Once tracking is enabled SDK would continue tracking the Advertising Identifier until explicitly opted-out. Use the disableAdIdTracking() method to opt-out of Advertising Identifier tracking.
import com.moengage.core.disableAdIdTracking
disableAdIdTracking(context)
MoESdkStateHelper.disableAdIdTracking(context);
For the SDK version below 12.1.00 use the TrackingOptoutConfig while initializing the MoEngage SDK.