Skip to Content
DocumentationAndroid SDKInstall Referrer & GAID

Install Referrer & GAID

Google Play Install Referrer

The Install Referrer API provides deterministic attribution on Android — the highest-confidence attribution method available. When a user clicks an ad and installs via the Play Store, Google passes the original click parameters directly to the SDK.

How It Works

  1. User clicks an ad link containing AttributeHQ click parameters
  2. Google Play stores the referrer URL during installation
  3. On first launch, the SDK reads the referrer via the Install Referrer API
  4. The referrer contains the original click ID, enabling exact matching

Attribution Priority

Install Referrer is the highest priority in the attribution waterfall on Android:

PriorityMethodConfidenceDescription
1Install Referrer100%Deterministic. Google passes click data directly
2Device ID (GAID)95-100%Deterministic. Matches GAID from click to install
3Fingerprint60-80%Probabilistic. IP + User-Agent matching
4OrganicNo matching click found

Install Referrer is only available on Android via Google Play. It’s the gold standard for attribution because it’s not affected by LAT (Limit Ad Tracking) settings.

Google Advertising ID (GAID)

The SDK collects the Google Advertising ID for device-based attribution matching.

How GAID is Used

  • GAID is included in the install request to the AttributeHQ server
  • The server matches it against GAIDs stored from ad click events
  • If the user has opted out of personalization, GAID is zeroed out and not used for matching

Ad ID Permission

The SDK requires the AD_ID permission (declared in its manifest):

<uses-permission android:name="com.google.android.gms.permission.AD_ID" />

Starting with Android 13, this permission is required to access the advertising ID. Without it, AdvertisingIdClient.getAdvertisingIdInfo() returns a zeroed ID.

Device ID Priority

The SDK uses this priority for device identification:

  1. GAID — If the user hasn’t opted out of personalization
  2. SharedPreferences UUID — A locally generated UUID stored in SharedPreferences
  3. New UUID — Generated on first launch if no other ID exists

Unlike iOS (which persists device IDs in the Keychain), Android SharedPreferences are cleared on app reinstall. This means the fallback UUID does not survive reinstalls.

Attribution Without GAID

When GAID is unavailable (user opted out, or permission not granted):

  • Install Referrer still works (it’s independent of GAID)
  • Fingerprint matching provides 60-80% confidence
  • The SDK still provides attribution value in most scenarios