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

# Enable Advertising Identifier Tracking

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://help.moengage.com/hc/en-us/articles/7457641031828-Android-Advertising-ID-Tracking).

## Add Ad Identifier Library

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

<CodeGroup>
  ```groovy Groovy wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  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/\[android-jvm]enable-ad-id-tracking.html) method as shown below.

<CodeGroup>
  ```Kotlin Kotlin wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import com.moengage.core.enableAdIdTracking
  enableAdIdTracking(context)
  ```

  ```Java Java wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
  MoESdkStateHelper.enableAdIdTracking(context);
  ```
</CodeGroup>

Please ensure the application is complying with the [Google Play Policy](https://support.google.com/googleplay/android-developer/answer/10144311) regarding Advertising Id tracking.
