> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Opt-outs

> Configure tracking opt-outs for device identifiers like GAID and Android ID in the MoEngage Android SDK.

By default, SDK tracks certain device identifiers like GAID, Android-id, activity names, etc. If required you can choose to opt-out of this tracking by using the TrackingOptOutConfig.\
Refer to the API reference of [TrackingOptOutConfig](https://moengage.github.io/android-api-reference/core/com.moengage.core.config/-tracking-opt-out-config/index.html) for more details on the available opt-outs. Use the [configureTrackingOptOut()](https://moengage.github.io/android-api-reference/core/com.moengage.core/-mo-engage/-builder/configure-tracking-opt-out.html) to pass on the configuration to the SDK.

<CodeGroup>
  ```Kotlin Kotlin wrap theme={null}
  val trackingOptOut = mutableSetOf<Class<*>>()
  trackingOptOut.add(YourActivityName::class.java)
  val trackingOptOutConfig = TrackingOptOutConfig(
      isCarrierTrackingEnabled = true,
      isDeviceAttributeTrackingEnabled = true,
      trackingOptOut
  )

  val moengage = MoEngage.Builder(
          application = application,
          appId = appId,
          dataCenter = DataCenter.DATA_CENTER_X
      )
      .configureTrackingOptOut(trackingOptOutConfig)
      .build()
  MoEngage.initialiseDefaultInstance(moengage)
  ```

  ```Java Java theme={null}
  Set<Class<?>> trackingOptOut = new HashSet<>();
     trackingOptOut.add(YourActivityName.class);
  MoEngage moEngage = new MoEngage.Builder(application, appId, DataCenter.DATA_CENTER_X)
      .configureFcm(new FcmConfig(true))
      .configureTrackingOptOut(new TrackingOptOutConfig(true, true, trackingOptOut))
      .build();
  MoEngage.initialiseDefaultInstance(moEngage);
  ```
</CodeGroup>
