> ## 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.

# 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 is complying with the [Google Play Policy](https://play.google/developer-content-policy/) regarding Advertising Id tracking.
