Deeplinkly

Glossary/Android platform

GAID

Definition

The GAID, or Google Advertising ID, is a resettable per-device identifier that Android provides for advertising and analytics, and which is replaced by a string of zeros for users who opt out of ads personalisation.

It is Android's counterpart to the IDFA, and its trajectory has been the same one arrived at more gradually: still available, still deterministic when present, and no longer something to build a measurement architecture on. Since Android 12 an opt-out returns zeros rather than a flag, and apps targeting recent API levels must declare a permission to read it at all.

Reading it correctly

Two things break GAID reads on modern Android: the missing manifest permission, and calling it on the main thread. Both fail in ways that look like an empty value rather than an error.

AndroidManifest.xml — required for apps targeting API 33+
<manifest ...>
  <!-- Without this, the ID is zeroed even for users who did NOT opt out. -->
  <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
</manifest>
The read, off the main thread
import com.google.android.gms.ads.identifier.AdvertisingIdClient

private const val ZEROED = "00000000-0000-0000-0000-000000000000"

suspend fun advertisingId(context: Context): String? =
    withContext(Dispatchers.IO) {          // blocking call; never on main
        try {
            val info = AdvertisingIdClient.getAdvertisingIdInfo(context)
            val id = info.id
            when {
                id.isNullOrEmpty() -> null
                id == ZEROED -> null       // opted out, or no AD_ID permission
                info.isLimitAdTrackingEnabled -> null
                else -> id
            }
        } catch (e: GooglePlayServicesNotAvailableException) {
            null                           // no Play services on this device
        } catch (e: IOException) {
            null                           // transient; safe to retry later
        }
    }
What you get in each state.
Device stateinfo.idisLimitAdTrackingEnabled
Normal, permission declaredA real UUIDfalse
User opted out of ads personalisationAll zerostrue
AD_ID permission not declared, API 33+All zerostrue
No Google Play servicesThrowsN/A
Play services present but staleMay throw IOExceptionN/A

The zeroed value is not an identifier

00000000-0000-0000-0000-000000000000 is returned as a normal string, so any pipeline that does not check for it collapses every opted-out device into a single identity. This is the same failure the IDFA has, and on Android it is easier to hit because the missing manifest permission produces it for users who never opted out of anything.

The rules that changed

GAID availability over time.
ChangeEffect
Limit Ad Tracking flag (original)ID still readable; you were expected to honour a boolean
Android 12Opting out zeroes the ID rather than setting a flag
Apps targeting API 33+Must declare com.google.android.gms.permission.AD_ID or receive zeros
Play policyDeclared use must match the app's Data Safety declaration

The direction is unambiguous, and it is the same direction Apple took: a device-wide identifier available by default is being replaced by purpose-scoped identifiers and aggregate reporting. Notably, Google's own Privacy Sandbox on Android programme — its intended aggregate replacement — was retired in October 2025, which leaves the GAID in place for longer than anyone planned but no more strategically sound.

Do not declare AD_ID reflexively

Declaring the permission when you do not read the ID creates a Data Safety declaration you have to justify and a policy surface you gain nothing from. If your attribution runs on the install referrer, you do not need it.

What to use instead

For attribution specifically, Android has a better signal than the GAID and always did. The install referrer is deterministic, needs no consent and no permission, and is not affected by any of the changes above.

Android identifiers and their appropriate uses.
IdentifierScopeConsent-dependentAppropriate for
GAIDDevice-wideYes — zeroed on opt-outAds personalisation, if consented
App Set IDYour apps on one deviceNoAnalytics, fraud prevention — not ads
Install referrerOne install eventNoInstall attribution and deferred deep linking
Your own click IDOne link clickNoFirst-party routing and campaign attribution
ANDROID_IDApp-signing-key scopedNoLegacy; not an ads identifier

The practical architecture is to treat the GAID as an optional enrichment rather than a key. If your join depends on it, a large and growing share of your users are simply absent from your reporting; if your join depends on the install referrer and a first-party click ID, the GAID's availability stops being an architectural risk.

Android SDK documentation

Our Android SDK attributes installs from the Play install referrer and your own click IDs, so it does not require the AD_ID permission and its accuracy does not move when a user opts out of ads personalisation.

Open the android sdk documentation

Frequently asked questions

What is the GAID?
The GAID, or Google Advertising ID, is a resettable UUID that identifies an Android device for advertising and analytics purposes. It is shared across apps on the device, which made it usable for matching an ad click in one app to an install in another, and it is provided by Google Play services rather than by the Android platform itself.
What happens when a user opts out of ads personalisation on Android?
Since Android 12 the advertising ID is replaced with the all-zero string 00000000-0000-0000-0000-000000000000 rather than being returned alongside an opt-out flag. Code that does not explicitly check for that value will treat every opted-out device as the same user, producing one implausibly active device and a corrupted attribution join.
Do I need the AD_ID permission?
Only if you actually read the advertising ID. Apps targeting API level 33 or higher must declare com.google.android.gms.permission.AD_ID in their manifest or they receive the zeroed value even for users who have not opted out. If your attribution runs on the Play install referrer, you do not need the permission and should not declare it.
Is the GAID the same as the IDFA?
They serve the same function on their respective platforms — a resettable, device-wide advertising identifier — and both have been progressively restricted. The mechanics differ: the IDFA requires an explicit App Tracking Transparency prompt, while the GAID is available by default unless the user opts out of ads personalisation or the app omits the AD_ID permission.
What replaces the GAID for install attribution?
The Play Install Referrer API, which is deterministic, requires no consent or permission, and delivers the referrer string and click timestamps for the install directly from Google Play. Pair it with a first-party click identifier you set on your own links and the advertising ID becomes an optional enrichment rather than something your measurement depends on.

Related terms

  • App Set IDThe App Set ID is an Android identifier consistent across all apps published by the same developer on one device, provided for analytics and fraud prevention and barred by Google Play policy from any advertising use.
  • Play Install ReferrerThe Play Install Referrer is a Google Play API that lets a newly installed Android app read the referrer string and click timestamps recorded when the user arrived at its Play Store listing.
  • IDFAThe IDFA, or Identifier for Advertisers, is a resettable per-device UUID that iOS provides to apps for advertising measurement, and which is only readable when the user has granted App Tracking Transparency permission.
  • Privacy Sandbox on AndroidThe Privacy Sandbox on Android was Google's initiative to replace cross-app advertising identifiers with on-device APIs for interest inference, audience targeting and conversion measurement, and Google announced its retirement in October 2025.