> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-gr001-flows-limits.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Advertising Identifier Tracking

> Enable advertising identifier tracking in the MoEngage Android SDK for accurate device analytics.

For accurate analytics around devices and tracking Re-installs, it is essential to track the Advertising Identifier. For more information, refer to [Android Advertising ID Tracking](https://www.moengage.com/docs/user-guide/data/privacy/android-advertising-id-tracking).

## Add Ad Identifier Library

Add the below dependency in the application-level ***build.gradle*** file.

<CodeGroup>
  ```groovy Groovy wrap theme={null}
  implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")
  ```
</CodeGroup>

To enable Advertising Identifier tracking use the [enableAdIdTracking()](https://moengage.github.io/android-api-reference/core/com.moengage.core/enable-ad-id-tracking.html) method as shown below.

<CodeGroup>
  ```Kotlin Kotlin wrap theme={null}
  import com.moengage.core.enableAdIdTracking
  enableAdIdTracking(context)
  ```

  ```Java Java wrap theme={null}
  MoESdkStateHelper.enableAdIdTracking(context);
  ```
</CodeGroup>

Please ensure the application complies with the [Google Play policy](https://play.google/developer-content-policy/) regarding advertising ID tracking.

<Info>
  To disable advertising identifier tracking, or to learn how to track Android ID alongside the advertising ID, see [Device Identifier Tracking](/developer-guide/android-sdk/data-tracking/advanced-or-optional/device-identifier-tracking).
</Info>
