Android Identity
Configure device identifier collection for Android
Version:
The SDK provides flexible options for collecting Android device identifiers to improve attribution accuracy.
Automatic Collection (Default)
By default, the SDK automatically collects:
- GAID (Google Advertising ID) - requires Play Services
- App Set ID - does not require user permission
- Android ID - fallback identifier
Configure in Unity: AudienceLab SDK > Privacy tab
Manual GAID Mode
If your app already collects GAID, you can provide it manually:
// Set GAID manually (call early, before SDK sends requests)
AudiencelabSDK.SetAdvertisingId("your-gaid-here");
// Optionally set App Set ID manually
AudiencelabSDK.SetAppSetId("your-app-set-id-here");
// Clear manual overrides
AudiencelabSDK.ClearAdvertisingId();
AudiencelabSDK.ClearAppSetId();Important
When using manual mode:
- Set the identity mode to Manual GAID in SDK settings
- Call
SetAdvertisingId()as early as possible (e.g., in your initialization code) - The SDK waits up to 2 seconds for identity before sending the first request
Identity Modes
| Mode | Description |
|---|---|
| Auto GAID | SDK automatically collects Google Advertising ID (recommended) |
| Manual GAID | You provide GAID via SetAdvertisingId() |
| Disabled | No GAID collection; relies on probabilistic matching |
App Set ID
App Set ID is a privacy-friendly identifier that:
- Does not require user permission
- Resets when user uninstalls all apps from your developer account
- Is useful for cross-app analytics within your app portfolio
// Enable automatic App Set ID collection in SDK settings
// Or set manually:
AudiencelabSDK.SetAppSetId("your-app-set-id-here");