Client SDKs
API Reference
Complete API reference for the Unity SDK
Version:
Event Methods
| Method | Description |
|---|---|
SendPurchaseEvent(id, name, value, currency, status, tr_id) | Track a purchase event |
SendAdEvent(ad_id, name, source, watch_time, reward, media_source, channel, value, currency, dedupeKey) | Track an ad impression |
SendCustomEvent(eventName, properties, dedupeKey) | Track a custom event |
User Property Methods
| Method | Description |
|---|---|
SetUserProperty(key, value, blacklisted) | Set a user property |
UnsetUserProperty(key, blacklisted) | Remove a user property |
ClearUserProperties(includeBlacklisted) | Clear all user properties |
Identity Methods (Android)
| Method | Description |
|---|---|
SetAdvertisingId(gaid) | Manually set GAID |
ClearAdvertisingId() | Clear manual GAID |
SetAppSetId(appSetId) | Manually set App Set ID |
ClearAppSetId() | Clear manual App Set ID |
Utility Methods
| Method | Description |
|---|---|
GetCreativeToken() | Get the current creative token |
GetTotalPurchaseValue() | Get cumulative purchase value |
GetTotalAdValue() | Get cumulative ad revenue |
ToggleMetricsCollection(enabled) | Enable/disable data collection |
GetIsMetricsCollection() | Check if collection is enabled |
GetAppVersion() | Get app version |
GetSDKVersion() | Get SDK version |
GetUnityVersion() | Get Unity version |
Version Information
// Get app version
string appVersion = AudiencelabSDK.GetAppVersion();
// Get SDK version
string sdkVersion = AudiencelabSDK.GetSDKVersion();
// Get Unity version
string unityVersion = AudiencelabSDK.GetUnityVersion();