Google Play Advertising ID (AD_ID) Declaration & Manifest Merge Guide
Monitor & improve -> Policy -> App content -> Advertising ID
- Inspect your compiled `.aab` merged manifest for `AD_ID` before answering: Run `bundletool dump manifest --bundle=app-release.aab | grep AD_ID` to see whether Gradle or Expo plugins merged `com.google.android.gms.permission.AD_ID` into your release binary.
- Choose Path A (Keep & Declare) for 13+/18+ apps using Analytics or Ads: If your app targets general/adult users and uses AdMob or Firebase attribution, answer `Yes` in `App content -> Advertising ID`, check exact purposes (`Advertising or marketing`, `Analytics`, `Fraud prevention`), and declare `Device or other IDs` in `Data safety`.
- Choose Path B (Strip Permission) for ad-free apps or Families / Under-13 apps: If your app never uses Advertising ID — or targets children under 13 — add `<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />` to `AndroidManifest.xml` and answer `No` in Play Console.
- Verify Google demo ad units on Closed Testing builds and publish changes: Ensure AdMob builds use official Google demo ad unit IDs (`ca-app-pub-3940256099942544/...`) during your 14-day closed test to avoid invalid-traffic limits, then submit in `Publishing overview`.
Why Gradle Manifest Merging Causes Surprise AD_ID Blocks
In Android's build system, your final `.aab` manifest is not just your hand-written `app/src/main/AndroidManifest.xml` — it is the union of every library AAR's `AndroidManifest.xml` merged by the Android Gradle Plugin (`AGP`). Including `com.google.firebase:firebase-analytics`, `com.google.android.gms:play-services-ads`, or OneSignal automatically appends `<uses-permission android:name="com.google.android.gms.permission.AD_ID" />` into the compiled bundle.
When you upload that `.aab` to Closed Testing before completing `App content -> Advertising ID` (or after answering `No`), Play Console halts the release immediately with an Advertising ID mismatch error. Inspecting the merged manifest first with `bundletool` or `/tools/app-ads-txt-admob-validator` removes all guesswork.
Safe AdMob Verification During Your 14-Day Closed Testing Window
Once your `AD_ID` declaration aligns cleanly with your manifest and `Data safety` checkboxes, protect your AdMob account standing throughout your 12-to-25 human tester closed test on GOOtester ($6 Basic, $12 Standard, or $20 Premium). Never ship live production AdMob ad unit IDs to a small cohort of testers repeatedly navigating screens, as concentrated pre-launch impressions routinely trip AdMob Invalid Traffic (`IVT`) limits.
Bind a `closedTesting` build variant or configuration flag to Google's official test ad unit IDs during the 14-day window, host `app-ads.txt` at your Play Store developer website root ahead of launch, and swap in live ad unit IDs on your Production rollout candidate.