Configuration
How to configure the AudienceLab Unity SDK
Initial Setup
- Navigate to AudienceLab SDK from the Unity menu to open the settings window
- Enter your authentication token provided by AudienceLab
- Click Verify to link your Unity project with your application
- Save the project and restart Unity to ensure proper initialization
SDK Settings Window
The SDK settings window is organized into three tabs:
Main Tab
| Setting | Description |
|---|---|
| isSDKEnabled | Master toggle for SDK functionality |
| SendStatistics | Enable/disable data collection |
| ShowDebugLog | Enable console logging for troubleshooting |
Privacy Tab
Configure device identifier collection for improved attribution:
| Mode | Description |
|---|---|
| Auto GAID | SDK automatically collects Google Advertising ID (recommended) |
| Manual/Disabled | You provide GAID via SetAdvertisingId(), or disable GAID collection to rely on probabilistic matching |
Additional options:
- Auto-collect App Set ID: Collects Android App Set ID (does not require user permission)
Dependency Behavior:
| Setting | Play Services Dependencies |
|---|---|
| Auto GAID enabled | ✅ Automatically added |
| Disabled + App Set ID auto | ✅ Automatically added |
| Disabled + App Set ID disabled | ❌ Not added |
Debug Tab
Configure the debug overlay for development and testing:
| Setting | Description |
|---|---|
| Enable Debug Overlay | Show/hide the debug overlay (Editor and Development builds only) |
| Max Events | Number of recent events to display in the overlay (default: 20) |
| Show Raw Identifiers | Display full device identifiers instead of truncated values |
| Toggle Key | Keyboard shortcut to toggle the overlay (default: F8) |
The debug overlay is only available in Unity Editor and Development builds. It will not appear in release builds.
Android Dependencies
The SDK requires Google Play Services dependencies for Android identity collection. These are managed automatically based on your SDK settings.
Automatic Mode (Default)
When Auto GAID or App Set ID Auto-collection is enabled:
- Dependencies are automatically generated at build time
- No manual configuration required
- The SDK creates
Assets/Plugins/Android/AudienceLabIdentity.gradlebefore each Android build
Disabled Mode
When GAID is disabled and App Set ID auto-collection is disabled:
- No Play Services dependencies are added
- Reduces app size and avoids unnecessary permissions
- Ideal for apps that don't need advertising identifiers
- You can still provide GAID and App Set ID by calling
SetAdvertisingId()andSetAppSetId()
Manual Dependency Management
If you prefer to manage dependencies manually or need to customize versions:
- Go to AudienceLab SDK > Android > Regenerate Android Dependencies to generate the gradle file
- Or add dependencies to your
mainTemplate.gradle:
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.google.android.gms:play-services-appset:16.0.2'
}Checking Dependency Status
Use AudienceLab SDK > Android > Check Android Dependencies to see:
- Current GAID mode
- Whether Play Services dependencies are required
- Whether the gradle file is present
ProGuard Configuration (Android)
For release builds with code obfuscation, add this ProGuard rule:
-keep class com.Geeklab.plugin.** { *; }Add this to your existing ProGuard configuration or create proguard-user.txt in Assets/Plugins/Android.