> ## 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 your React Native app for accurate device analytics.

For accurate analytics around devices and tracking Re-installs, it is essential to track the Advertising Identifier.

## Add Ad Identifier Library

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

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

To enable Advertising Identifier tracking use the *enableAdIdTracking()* method as shown below.

<CodeGroup>
  ```javascript Javascript theme={null}
  import ReactMoE from 'react-native-moengage'
  ReactMoE.enableAdIdTracking();
  ```
</CodeGroup>

Before you enable Advertising Id tracking please ensure the application is complying with the [Google Play Policy](https://support.google.com/googleplay/android-developer/answer/10144311) regarding Advertising Id tracking. Refer to our [help document](https://www.moengage.com/docs/user-guide/data/privacy/android-advertising-id-tracking) for more information on the policy.

In case, you need to disable advertising-id after enabling tracking use the following method.

<CodeGroup>
  ```javascript Javascript theme={null}
  import ReactMoE from 'react-native-moengage'
  ReactMoE.disableAdIdTracking();
  ```
</CodeGroup>

<Info>
  The above APIs are available only starting plugin version 7.4.1. In the older versions, Advertising Identifier tracking is enabled by default.
</Info>
