Client-SideUnity SDKAndroid

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:

  1. Set the identity mode to Manual GAID in SDK settings
  2. Call SetAdvertisingId() as early as possible (e.g., in your initialization code)
  3. The SDK waits up to 2 seconds for identity before sending the first request

Identity Modes

ModeDescription
Auto GAIDSDK automatically collects Google Advertising ID (recommended)
Manual GAIDYou provide GAID via SetAdvertisingId()
DisabledNo 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");