Attention
This is a guide for the installation and setup of Unity SDK v4. Please check the Unity SDK guide for previous versions.
You can install the Airbridge Unity SDK and add the settings.
The Airbridge Unity SDK can be installed using the method below. After installation, you can confirm whether the SDK has been properly installed through a Unity SDK Test.
Download the latest version of the Airbridge Unity SDK.
Choose Assets > Import Package > Custom Package ...
and import the downloaded package file.
The AB180 tab will appear in the menu once the package is installed.
Attention
Install only one version of the SDK, either the general SDK or the restricted SDK.
Depending on policies and environments, restrictions on collecting device IDs like GAID and IDFA may be required. When installing the Restricted SDK version, the device IDs are not collected.
Install the Restricted SDK using the method below.
Download the latest version of the Airbridge Unity SDK.
Choose Assets > Import Package > Custom Package ...
and import the downloaded package file.
The AB180 tab will appear in the menu once the package is installed.
Enter the correct values for the App Name
, App Token
in the Configure SDK.
You can find App Name and App Token in the "Airbridge Dashboard → Settings → Tokens" tab.
Choose AB180 > Airbridge Settings
and you will see a screen like the one below. You can omit the key values that don't need to be set.
Value | Reference |
---|---|
App Name | |
App Token | |
Log Level | |
iOS URI Scheme | |
Android URI Scheme | |
Session Timeout Seconds | |
User Info Hash Enabled | |
Track Airbridge Link Only | |
Auto Start Tracking Enabled | |
Facebook Deferred App Link Enabled | |
iOS Tracking Authorize Timeout Seconds | |
SDK Signature Secret ID | |
SDK Signature Secret | |
Track In Session Life Cycle Event Enabled | |
Clear Event Buffer On Initialize Enabled | |
SDK Enabled | |
Event Buffer Count Limit | |
Event Buffer Size Limit In Gibibyte | |
Event Transmit Interval Seconds | |
Meta Install Referrer (Facebook App ID) | |
Is Handle Airbridge Deeplink Only |
Note
The functions necessary to ensure compliance with privacy policies should be reviewed with legal counsel.
In the iOS environment, only the IDFA of users who have agreed to information collection in the AppTrackingTransparency (ATT) prompt can be collected as identifiers.
Event collection should be delayed until the user agrees to tracking. If you collect app installation events before the user agrees to information collection in the ATT prompt, the event will lack an identifier, making performance measurement difficult. We recommend setting a sufficient delay time for event collection in order to collect identifiers.합니다.
1. Prepare the phrase you will use for the ATT prompt.
2. Please provide the ATT prompt following the guide provided by Apple.
3. If the Airbridge Unity SDK doesn't collect installation events, it delays the collection of installation events for 30 seconds until the user agrees to be tracked each time the app is launched. If the user exits the app before deciding whether to allow tracking, it does not collect installation events and will try again on the next app launch.
The iOS Tracking Authorize Timeout Seconds
of Configure SDK can be used to set a longer delay for collecting installation events. The default setting for the iOS Tracking Authorize Timeout Seconds
is 300 seconds. It can be set up to a maximum of 3600 seconds (1 hour).
Attention
Sufficient time must be configured to delay the collection of install events. If the delay time is up, the SDK will collect install events without identifiers before users can allow tracking on the ATT prompt.
Attention
The instructions below are optional. Proceed only if necessary.
Opt-In is a policy that does not use user information until the user agrees.
After setting the Auto Start Tracking Enabled
of Configure SDK to false, call the StartTracking
function at the point where you can collect events. From the time the StartTracking
function is called, events are collected.
Airbridge.StartTracking();
Attention
The instructions below are optional. Proceed only if necessary.
Opt-Out is a policy that does not use user information until the user agrees.
After setting the Auto Start Tracking Enabled
of Configure SDK to true, call the StopTracking
function at the point where you can not collect events. From the time the StopTracking
function is called, events are not collected.
Airbridge.StopTracking();
Attention
The instructions below are optional. Proceed only if necessary.
With SDK Signature, you can prevent SDK Spoofing and use only events with verified accuracy and safety for advertising performance measurement.
The SDK Signature setting requires SDK Signature security information. The SDK Signature security information includes Secret ID and Secret. The required SDK Signature security information can be found on the Airbridge dashboard. For more details about SDK Signature security information, please refer to the Airbridge guide.
Enter the SDK Signature Secret ID
of Configure SDK
Enter the SDK Signature Secret
of Configure SDK
The information needed for SDK configuration is as follows.
sdkSignatureID
: Signature ID. This can be found under [Management]>[Fraud Verification Rules]>[SDK Signature] on the Airbridge Dashboard.
sdkSignatureSecret
: Signature Secret. This can be found under [Management]>[Fraud Verification Rules]>[SDK Signature] on the Airbridge Dashboard.
By setting up a deeplink, you can direct users who click on ads with tracking links to specific pages of the desired app. Also, based on the information collected through the tracking link, you can check the results that occurred through the deep link in Airbridge.
When Airbridge generates a tracking link, it automatically selects and utilizes the optimal Airbridge Deeplink depending on the environment, which will be used for user transition, the scheme deeplink (Scheme Deeplink).
Example)
Airbridge Deeplink: https://YOUR_APP_NAME.airbridge.io/~~~
Scheme Deeplink: YOUR_SCHEME://product/12345
When the app is installed, if a user opens the tracking link, the app opens with the Airbridge Deeplink. The Airbridge SDK converts the Airbridge Deeplink into a scheme deeplink that is set on the tracking link. The converted scheme deeplink is delivered to the app.
If the app is not installed, when a user opens the tracking link, it saves the Airbridge Deeplink. After moving to the app store or website, once the app is installed and run, the Airbridge SDK converts the saved Airbridge Deeplink into a scheme deeplink. The converted scheme deeplink is delivered to the app.
We are setting up deep links. You will need the information set on the Airbridge dashboard and the app page address used as the user's destination.
First, register the deep link information in Airbridge.
For the deep linking setup, the following information must be entered into the Airbridge dashboard.
iOS URI scheme: The Airbridge deep link is converted to a scheme deep link using the iOS URI scheme.
iOS App ID: The universal link domain of the Airbridge deep link is set using the iOS App ID.
Android URI scheme: The Airbridge deep link is converted to a schema deep link using the Android URI scheme. This information is necessary for the App Link and URI scheme.
Package name: This is the Android app identifier necessary for the App Link and URI scheme.
Android sha256_cert_fingerprints: This is used for setting the App Link domain. This information is necessary for the App Link.
Attention
To properly redirect users as intended, submit different information for the production app and the development app.
Follow the steps below to enter the above information into the Airbridge dashboard.
1. Go to [Tracking Link]>[Deep Links] in the Airbridge dashboard.
2. Enter the iOS URI scheme in the iOS URI Scheme field. Include ://
. For example, if the iOS URI scheme is demo
, you enter it as demo://
.
3. In the Apple Developer Dashboard, go to [Identifier] of the app you want to set up the deep link. Find the App ID Prefix and Bundle ID.
4. The iOS App ID is in the format of App ID Prefix+ .+ Bundle ID
. Enter the iOS App ID into the iOS App ID field. For example, if the App ID Prefix is prefix
and the Bundle ID is example
, the iOS App ID is prefix.example
.
1. Go to [Tracking Link]>[Deep Links] in the Airbridge dashboard.
2. Enter the Android URI scheme into the Android URI Scheme field. Include ://
. For example, if the URI scheme is demo
, you must enter it as demo://
.
3. Enter the package name in the Package name field.
4. You need to find the sha256_cert_fingerprints. Run the following command from the keystore file you are deploying.
keytool -list -v -keystore YOUR_KEYSTORE.keystore
Find the SHA256 value in the results. The SHA256 value is the sha256_cert_fingerprints.
Certificate fingerprints:
MD5: 4C:65:04:52:F0:3F:F8:65:08:D3:71:86:FC:EF:C3:49
SHA1: C8:BF:B7:B8:94:EA:5D:9D:38:59:FE:99:63:ED:47:B2:D9:5A:4E:CC
SHA256: B5:EF:4D:F9:DC:95:E6:9B:F3:9A:5E:E9:D6:E0:D8:F6:7B:AB:79:C8:78:67:34:D9:A7:01:AB:6A:86:01:0E:99
5. Enter the SHA256 value into the sha256_cert_fingerprints field.
After registering the deep link information with Airbridge, you need to set up the deep link in the app. The necessary developments for deep linking in an app include the following:
Launch apps with Airbridge deep links.
Collect deep link events in the app.
Redirect users with Airbridge deep links.
Please refer to the content below.
Follow the steps below to enable app launch with Airbridge deep links after the user clicks on a tracking link.
Set up the scheme deep link to your app.
In Configure SDK, enter the iOS URI scheme that you entered in the dashboard in field iOS URI Scheme
.
Setting up Universal Link is done automatically through the App Name
value in Configure SDK.
Set up the scheme deep link to your app.
In Configure SDK, enter the Android URI scheme that you entered in the dashboard in field Android URI Scheme
.
Setting up App Links is done automatically through the App Name
value in Configure SDK.
Attention
The following settings are applied automatically. Please apply manually only if you are using a custom iOS AppDelegate or a custom Android activity, as they are not applied automatically.
The Airbridge Unity SDK uses custom AppDelegate(Assets/Plugins/Airbridge/iOS/Delegate/AUAppDelegate.mm
). If users are already using a custom AppDelegate, please add the following code to that custom AppDelegate.
#import "AirbridgeUnity.h"
- (void)onOpenURL:(NSNotification *)notification {
NSURL* url = notification.userInfo[@"url"];
[Airbridge trackDeeplinkWithUrl:url];
if (AirbridgeUnity.sharedInstance.deeplinkOnReceived == nil) { return; }
AirbridgeUnity.sharedInstance.deeplinkOnReceived(url.absoluteString);
}
- (void)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>>* _Nullable))restorationHandler {
[Airbridge trackDeeplinkWithUserActivity:userActivity];
if (AirbridgeUnity.sharedInstance.deeplinkOnReceived == nil) { return; }
AirbridgeUnity.sharedInstance.deeplinkOnReceived(userActivity.webpageURL.absoluteString);
}
The Airbridge Unity SDK uses custom activity(Assets/Plugins/Airbridge/Android/java/co/ab180/airbridge/unity/AirbridgeActivity.java
) to get deep link data. If you are using your own custom activity class, please override the following codes inside your custom activity class.
import co.ab180.airbridge.unity.AirbridgeUnity
override fun onResume() {
super.onResume()
AirbridgeUnity.processHandleDeeplink(intent)
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
setIntent(intent)
}
import co.ab180.airbridge.unity.AirbridgeUnity;
@Override
protected void onResume() {
super.onResume();
AirbridgeUnity.processHandleDeeplink(getIntent());
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
When the Airbridge deeplink is executed, it is converted into a scheme deeplink and passed on to the onDeeplinkReceived
callback. And if a deeplink that is not an Airbridge deeplink is executed, it is delivered to the callback without conversion.
Utilize the received deeplink to send the user to the set destination.
Airbridge.SetOnDeeplinkReceived((string deeplink) =>
{
// show proper content using url
});
When you click a tracking link set up with a deferred deeplink in a state where the app is not installed, Airbridge saves the deeplink. When a deferred deeplink is set up, the Airbridge SDK acquires the deeplink in the following way.
The Airbridge SDK attempts to retrieve a deep link after initializing the SDK when all the following conditions are met. If the app is closed during retrieval, the Airbridge SDK treats it as if there is no stored Airbridge deep link.
The Airbridge.StartTracking
function is called with the opt-in settings in place. Or, opt-in has not been set.
The ATT tracking response has been determined. Or, the event collection delay time set in the ATT prompt has expired.
Deferred deep links are automatically passed to onDeeplinkReceived callback, so no additional settings are required.
The Airbridge SDK collects specific user actions that occur in the service, according to the settings, and then sends them as in-app events.
Setting up a Hybrid App
You can set up the Unity SDK to handle Airbridge-related work occurring on in-app websites in hybrid apps without changing the website code.
To send an event, you must call the Airbridge.TrackEvent function. The necessity and type of the components of the Airbridge.TrackEvent function are as follows.
public static void TrackEvent(
string category,
Dictionary<string, object> semanticAttributes = null,
Dictionary<string, object> customAttributes = null
)
Component | Required | Type | Description |
---|---|---|---|
category | Required | String | Categories in Events |
semanticAttributes | Optional | Dictionary<string, object> | Semantic attributes for events |
customAttributes | Optional | Dictionary<string, object> | Custom attributes for events |
Check the definition and available characters of each component below.
You can check the standard event categories provided by the Airbridge SDK in AirbridgeCategory. Or, enter the event category you've found in the standard event list.
Custom events can be sent by entering the event name set in the event taxonomy.
Please refer to the example below.
// track standard event (provided by sdk)
Airbridge.TrackEvent(AirbridgeCategory.ORDER_COMPLETED);
// track standard event (not provided by sdk)
Airbridge.TrackEvent("airbridge.ecommerce.order.canceled");
// track custom event
Airbridge.TrackEvent("eventViewed");
Attention
The Airbridge SDK v4 attributes differ from the previous version. The previous version's attributes do not include action, label, and value.
You can collect additional information of the event through attributes.
Action, Label: Information which can be utilized in Airbridge reports as group-bys are collected.
Value: Information used for sales analysis is collected. Data collected can freely be applied in arithmetic operations.
Semantic Attribute: It is an attribute predefined by Airbridge. The list of semantic attributes provided by Airbridge can be found in the Airbridge guide.
Custom Attributes: Attributes defined by Airbridge users.
You can enter Action, Label, Value, and Semantic Attributes through the semanticAttributes parameter of the Airbridge.TrackEvent
function, and enter Custom Attributes through the customAttributes parameter.
You can check the list of semantic attributes provided by Airbridge below.
Please refer to the example below.
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: new Dictionary<string, object>()
{
// action
{ AirbridgeAttribute.ACTION, "Tool" },
// label
{ AirbridgeAttribute.LABEL, "Hammer" },
// value
{ AirbridgeAttribute.VALUE, 10 },
// semantic attribute (provided by sdk)
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
// semantic attribute value (provided by sdk)
{ AirbridgeAttribute.PRODUCT_ID, "12345" },
// semantic attribute value (not provided by sdk)
{ "name", "PlasticHammer" },
},
}
},
// semantic attribute (not provided by sdk)
{ "totalQuantity", 1 }
},
customAttributes: new Dictionary<string, object>()
{
// custom attribute
{ "promotion", "FirstPurchasePromotion" }
}
);
Attention
Semantic attributes and custom attributes only allow JSON as a data type.
JSON types: String, Number, Boolean, Object<String, JSON>, Array<JSON>
Types that cannot be used in semantic attributes and custom attributes: Struct, Class, etc.
The standard event categories and semantic attributes provided by the SDK are as follows.
Key | Type | Value |
---|---|---|
SIGN_UP | String | airbridge.user.signup |
SIGN_IN | String | airbridge.user.signin |
SIGN_OUT | String | airbridge.user.signout |
HOME_VIEWED | String | airbridge.ecommerce.home.viewed |
PRODUCT_LIST_VIEWED | String | airbridge.ecommerce.productList.viewed |
SEARCH_RESULTS_VIEWED | String | airbridge.ecommerce.searchResults.viewed |
PRODUCT_VIEWED | String | airbridge.ecommerce.product.viewed |
ADD_PAYMENT_INFO | String | airbridge.addPaymentInfo |
ADD_TO_WISHLIST | String | airbridge.addToWishlist |
ADDED_TO_CART | String | airbridge.ecommerce.product.addedToCart |
INITIATE_CHECKOUT | String | airbridge.initiateCheckout |
ORDER_COMPLETED | String | airbridge.ecommerce.order.completed |
ORDER_CANCELED | String | airbridge.ecommerce.order.canceled |
START_TRIAL | String | airbridge.startTrial |
SUBSCRIBE | String | airbridge.subscribe |
UNSUBSCRIBE | String | airbridge.unsubscribe |
AD_IMPRESSION | String | airbridge.adImpression |
AD_CLICK | String | airbridge.adClick |
COMPLETE_TUTORIAL | String | airbridge.completeTutorial |
ACHIEVE_LEVEL | String | airbridge.achieveLevel |
UNLOCK_ACHIEVEMENT | String | airbridge.unlockAchievement |
RATE | String | airbridge.rate |
SHARE | String | airbridge.share |
SCHEDULE | String | airbridge.schedule |
SPEND_CREDITS | String | airbridge.spendCredits |
Key | Type | Value |
---|---|---|
ACTION | String | action |
LABEL | String | label |
VALUE | String | value |
CURRENCY | String | currency |
ORIGINAL_CURRENCY | String | originalCurrency |
PRODUCTS | String | products |
PRODUCT_ID | String | productID |
PRODUCT_NAME | String | name |
PRODUCT_PRICE | String | price |
PRODUCT_QUANTITY | String | quantity |
PRODUCT_CURRENCY | String | currency |
PRODUCT_POSITION | String | position |
PRODUCT_CATEGORY_ID | String | categoryID |
PRODUCT_CATEGORY_NAME | String | categoryName |
PRODUCT_BRAND_ID | String | brandID |
PRODUCT_BRAND_NAME | String | brandName |
PERIOD | String | period |
IS_RENEWAL | String | isRenewal |
RENEWAL_COUNT | String | renewalCount |
PRODUCT_LIST_ID | String | productListID |
CART_ID | String | cartID |
TRANSACTION_ID | String | transactionID |
TRANSACTION_TYPE | String | transactionType |
TRANSACTION_PAIRED_EVENT_CATEGORY | String | transactionPairedEventCategory |
TRANSACTION_PAIRED_EVENT_TIMESTAMP | String | transactionPairedEventTimestamp |
TOTAL_QUANTITY | String | totalQuantity |
QUERY | String | query |
IN_APP_PURCHASED | String | inAppPurchased |
CONTRIBUTION_MARGIN | String | contributionMargin |
ORIGINAL_CONTRIBUTION_MARGIN | String | originalContributionMargin |
LIST_ID | String | listID |
RATE_ID | String | rateID |
RATE | String | rate |
MAX_RATE | String | maxRate |
ACHIEVEMENT_ID | String | achievementID |
SHARED_CHANNEL | String | sharedChannel |
DATE_TIME | String | datetime |
DESCRIPTION | String | description |
IS_REVENUE | String | isRevenue |
PLACE | String | place |
SCHEDULE_ID | String | scheduleID |
TYPE | String | type |
LEVEL | String | level |
SCORE | String | score |
AD_PARTNERS | String | adPartners |
IS_FIRST_PER_USER | String | isFirstPerUser |
Refer to the example codes for each type of data below.
Airbridge.TrackEvent(
category: "event",
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 10 },
},
customAttributes: new Dictionary<string, object>()
{
{ "string", "string" },
{ "number", 1000 },
{ "boolean", true },
{
"object", new Dictionary<string, object>()
{
{ "key", "value" }
}
},
{ "array", new List<object>() { "value" } },
}
);
Attention
The default settings will apply if no additional settings are configured. Proceed after reviewing whether additional settings are necessary.
You can add the necessary settings for the in-app events that you send.
The Airbridge SDK supports events triggered by users on a session basis. A session ends if any of the following conditions are met.
The app moves to the background, or the app is terminated
The session expires with the app being in the foreground
When the app is launched or an event is performed after the end of a session, a new session is initiated.
The default session timeout is set to 300 seconds. Use the Session Timeout Seconds
field of Configure SDK to modify this value of up to 604,800 seconds (7 days).
Attention
The Airbridge SDK collects Open events that initiate a new session and Foreground events. It does not collect these events during a session. To collect them while the session is being maintained, additional settings are required.
The Airbridge SDK maintains a queue of collected events and transmits them until the queue is empty.
If event transmission fails, transmission is attempted again after waiting for 1, 2, 4, ... seconds, depending on the number of times it failed. If the transmission continues to fail, the SDK waits for the set event transmission interval and repeats loading events until successful.
The default transmission interval is 0 seconds. Using the Event Transmit Interval Seconds
field of Configure SDK, you can modify it up to 86,400 seconds (1 day).
The Airbridge SDK stores events as long as they don't exceed the maximum event count and size limits. Excess events are discarded.
The default maximum event count is set to INT_MAX, and the default maximum event size is 1024 GiB (gibibytes). You can adjust these settings using the Event Buffer Count Limit
field and Event Buffer Size Limit In Gibibyte
field of Configure SDK. The highest allowable event count is INT_MAX, and the highest maximum event size you can set is 1024 GiB (gibibytes).
When the event deletion option is activated, all in-app events that are not transmitted during the initialization process of the Airbridge SDK are deleted. By default, the event deletion option is inactive.
By setting the Clear Event Buffer On Initialize Enabled
field of Configure SDK to true, the event deletion option is activated.
The Airbridge SDK supports functions to include device identifiers in all events for transmission.
Function | Description |
---|---|
| Adds additional device identifiers. Up to 10 can be entered. - Key: Maximum 128 characters. It must satisfy the regular expression - Value: Maximum 128 characters. |
| Deletes the specified device identifier from among the device identifiers. |
| Deletes all device identifiers. |
Refer to the example below.
Airbridge.SetDeviceAlias("string", "string");
Airbridge.RemoveDeviceAlias("string");
Airbridge.ClearDeviceAlias();
The main in-app events collected by Airbridge are standard events and custom events. Standard events are those defined by Airbridge. Refer to the example code below.
Airbridge.SetUserID("string");
Airbridge.SetUserAlias("string", "string");
Airbridge.SetUserEmail("string");
Airbridge.SetUserPhone("string");
Airbridge.SetUserAttribute("string", "string");
Airbridge.TrackEvent(AirbridgeCategory.SIGN_UP);
Airbridge.SetUserID("string");
Airbridge.SetUserAlias("string", "string");
Airbridge.SetUserEmail("string");
Airbridge.SetUserPhone("string");
Airbridge.SetUserAttribute("string", "string");
Airbridge.TrackEvent(AirbridgeCategory.SIGN_IN);
Airbridge.TrackEvent(AirbridgeCategory.SIGN_OUT);
Airbridge.ClearUser();
Airbridge.TrackEvent(AirbridgeCategory.HOME_VIEWED);
Airbridge.TrackEvent(
category: AirbridgeCategory.PRODUCT_LIST_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LIST_ID, "84e6e236-38c4-48db-9b49-16e4cc064386" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SEARCH_RESULTS_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.QUERY, "Plastic" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.PRODUCT_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADD_PAYMENT_INFO,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TYPE, "CreditCard" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADD_TO_WISHLIST,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LIST_ID, "189a2f8b-83ee-4074-8158-726be54e57d4" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADDED_TO_CART,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.CART_ID, "421eaeb7-6e80-4694-933e-f2e1a55e9cbd" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.INITIATE_CHECKOUT,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "0a7ee1ec-33da-4ffb-b775-89e80e75978a" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 11 },
{ AirbridgeAttribute.TRANSACTION_ID, "8065ef16-162b-4a82-b683-e51aefdda7d5" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.IN_APP_PURCHASED, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_CANCELED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 11 },
{ AirbridgeAttribute.TRANSACTION_ID, "8065ef16-162b-4a82-b683-e51aefdda7d5" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.IN_APP_PURCHASED, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.START_TRIAL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "ef1e5271-0370-407c-b1e9-669a8df1dc2c" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.PERIOD, "P1M" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SUBSCRIBE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 15 },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.TRANSACTION_ID, "cbe718c7-e44e-4707-b5cd-4a6a29f29649" },
{ AirbridgeAttribute.PERIOD, "P1M" },
{ AirbridgeAttribute.IS_RENEWAL, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.UNSUBSCRIBE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 15 },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.TRANSACTION_ID, "cbe718c7-e44e-4707-b5cd-4a6a29f29649" },
{ AirbridgeAttribute.IS_RENEWAL, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 0.01 },
{
AirbridgeAttribute.AD_PARTNERS, new Dictionary<string, object>()
{
{
"mopub", new Dictionary<string, object>()
{
{ "app_version", "5.18.0" },
{ "adunit_id", "12345" },
{ "adunit_name", "12345" },
{ "adunit_format", "Banner" },
{ "id", "12345" },
{ "currency", "USD" },
{ "publisher_revenue", 12345.123 },
{ "adgroup_id", "12345" },
{ "adgroup_name", "12345" },
{ "adgroup_type", "12345" },
{ "adgroup_priority", "12345" },
{ "country", "kr" },
{ "precision", "publisher_defined" },
{ "network_name", "12345" },
{ "network_placement_id", "12345" },
{ "demand_partner_data", "12345" },
}
}
}
},
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.AD_CLICK,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 0.01 },
{
AirbridgeAttribute.AD_PARTNERS, new Dictionary<string, object>()
{
{
"mopub", new Dictionary<string, object>()
{
{ "app_version", "5.18.0" },
{ "adunit_id", "12345" },
{ "adunit_name", "12345" },
{ "adunit_format", "Banner" },
{ "id", "12345" },
{ "currency", "USD" },
{ "publisher_revenue", 12345.123 },
{ "adgroup_id", "12345" },
{ "adgroup_name", "12345" },
{ "adgroup_type", "12345" },
{ "adgroup_priority", "12345" },
{ "country", "kr" },
{ "precision", "publisher_defined" },
{ "network_name", "12345" },
{ "network_placement_id", "12345" },
{ "demand_partner_data", "12345" },
}
}
}
},
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.COMPLETE_TUTORIAL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.DESCRIPTION, "Finish Initial Tutorial" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ACHIEVE_LEVEL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LEVEL, 13 },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.UNLOCK_ACHIEVEMENT,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.ACHIEVEMENT_ID, "36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1" },
{ AirbridgeAttribute.DESCRIPTION, "Get Score Over 50" },
{ AirbridgeAttribute.SCORE, 80 },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.RATE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.RATE_ID, "531c64b3-4704-4780-a306-89014ec18daf" },
{ AirbridgeAttribute.RATE, 4.5 },
{ AirbridgeAttribute.MAX_RATE, 5 },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SHARE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.DESCRIPTION, "Share Promotion" },
{ AirbridgeAttribute.SHARED_CHANNEL, "CopyLink" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SCHEDULE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.SCHEDULE_ID, "75712915-2cd9-4e42-a85e-8d42f356f4c6" },
{ AirbridgeAttribute.DATE_TIME, "2024-01-01T00:00:00+00:00" },
{ AirbridgeAttribute.PLACE, "ConferenceRoom" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "abb3e65d-17bc-4b28-89e3-5e356c0ea697" },
{ AirbridgeAttribute.PRODUCT_NAME, "ConferenceRoom" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SPEND_CREDITS,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "22eb193d-be11-4fe4-95da-c91a196faf1c" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Custom events are events that redefine user behavior that does not correspond to standard events to track advertising performance tailored to the app service. Please refer to the example code below.
Airbridge.TrackEvent(
category: "event",
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 10 },
},
customAttributes: new Dictionary<string, object>()
{
{ "string", "string" },
{ "number", 1000 },
{ "boolean", true },
{
"object", new Dictionary<string, object>()
{
{ "key", "value" }
}
},
{ "array", new List<object>() { "value" } },
}
);
Sends user information, including events. Based on this user information, we can more accurately analyze advertising performance that occurs on the web and app.
The User ID is a user identifier used in the service. The User ID should be a unique ID that can identify a user as one user across the web and app.
Function |
Description |
---|---|
| Enter a user ID. |
| Delete the user ID. |
| Enter additional user identifiers. You can enter up to 10. - key: Up to 128 characters. It must satisfy the regular expression: - value: Up to 1024 characters. |
| Deletes the specified identifier from the additional user identifiers entered. |
| Delete all additional user identifiers entered.. |
Refer to the example below.
// ID
Airbridge.SetUserID("testID");
// Alias
Airbridge.SetUserAlias("ADD_YOUR_KEY", "ADD_YOUR_VALUE");
Airbridge.RemoveUserAlias("DELETE_THIS_KEY");
Airbridge.ClearUserAlias();
Attention
Sensitive user information may be included. Send after a thorough review with a legal advisor.
You can send additional user information by setting user attributes.
Function |
Description |
---|---|
| Enter the user email. It is hashed with SHA256. |
| Delete the user email. |
| Enter the user phone number. It is hashed with SHA256. |
| Delete the user phone number. |
| Enter additional user attributes. You can enter up to 100. - key: Up to 128 characters. It must satisfy the regular expression: - value: Only supports String, Number, and Boolean types. Up to 1024 characters. |
| Delete the specified attribute from the additional user attributes entered. |
| Delete all additional user attributes. |
Refer to the example below.
// Automatically hashed on client side using SHA256
// Can turn off hashing feature with special flag
Airbridge.SetUserEmail("testID@ab180.co");
Airbridge.SetUserPhone("821012341234");
// Attributes
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1L);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1f);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1.0);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", "1");
Airbridge.SetUserAttribute("ADD_YOUR_KEY", true);
Airbridge.RemoveUserAttribute("DELETE_THIS_KEY");
Airbridge.ClearUserAttributes();
When the User Info Hash Enabled
of Configure SDK is set to false, it sends the user's email and phone number without hashing. The default setting is true.
You can initialize user information with the Airbridge.ClearUser
function.
Airbridge.ClearUser();
You can additionally set up the Unity SDK.
Attention
The instructions below are optional. Proceed only if necessary.
The deep links received through the Airbridge.SetOnDeeplinkReceived
method of the Airbridge Unity SDK include not only Airbridge deep links but also deep links from other solutions.
Airbridge.SetOnDeeplinkReceived((string deeplink) =>
{
// show proper content using url
});
If you set Is Handle Airbridge Deeplink Only
to true
, only Airbridge deep links will be delivered through the onDeeplinkReceived
callback. If you are using deep links from different solutions, you can handle the deep links separately.
Depending on how the link is opened, it may be difficult to properly use the tracking link of the app in-app.
By using the Airbridge.Click
function or the Airbridge.Impression
function, you can properly use the tracking link without going through an external browser.
When a user clicks on the tracking link in the app, it calls the Airbridge.Click
function. When this function is called, it sends a scheme deeplink according to the tracking link settings, or sends it to the app market or website.
Airbridge.Click(
trackingLink: "https://abr.ge/~~~",
onSuccess: () =>
{
// when url is tracking link and succeed
},
onFailure: (Exception e) =>
{
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
);
When a user is impressed to the tracking link, it calls the Airbridge.Impression
function. Calling this function collects Impression event data.
Airbridge.Impression(
trackingLink: "https://abr.ge/~~~",
onSuccess: () =>
{
// when url is tracking link and succeed
},
onFailure: (Exception e) =>
{
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
);
Attention
When you set up the Airbridge SDK to use tracking links within apps, every time a tracking link is used within the app, Deeplink Pageviews are aggregated as Target Events. The deep link performance may be affected when Deeplink Pageviews occur frequently right after Deeplink Opens.
The attribution window for Deeplink Pageviews is set to 3 days by default. If you want to change the attribution window for Deeplink Pageviews, contact your Airbridge CSM. If you don't have a designated CSM, contact the Airbridge Help Center.
Attention
It takes some time for the Airbridge SDK to collect attribution results. We do not recommend using attribution results for functionalities requiring real-time processing.
You can receive attribution results for installation events through the Airbridge.SetOnAttributionReceived
function.
Airbridge.SetOnAttributionReceived((Dictionary<string, object> result) =>
{
// Process attribution data
});
The value is delivered as follows, depending on the existence of attribution results.
If the attribution result exists, a dictionary including the values below will be passed as a callback. All keys provide the attribution data. For example, attributedChannel
contains information about the ad channel to which the ad performance is attributed.
The attribution results are delivered as a callback within 1 minute after SDK initialization. If the app is closed before the attribution result is delivered, the previous attribution results will be delivered as a callback within 1 minute the next time the app is launched. Depending on network conditions and other factors, there may be a delay of up to 5 minutes.
Key | Type | Description |
---|---|---|
attributedChannel | String | Channel |
attributedCampaign | String | Campaign |
attributedAdGroup | String | Ad Group |
attributedAdCreative | String | Ad Creative |
attributedContent | String | Content |
attributedTerm | String | Keyword |
attributedSubPublisher | String | Sub Publisher |
attributedSubSubPublisher1 | String | Sub Sub Publisher 1 |
attributedSubSubPublisher2 | String | Sub Sub Publisher 2 |
attributedSubSubPublisher3 | String | Sub Sub Publisher 3 |
If there is no attribution result, the following dictionary will be sent as a callback. For this data to be delivered, the app must be launched again at least 3 hours after the SDK initialization.
{
"attributedChannel": "unattributed"
}
Attention
Apply the code below using a custom iOS AppDelegate.
After the push notification is clicked, you need to pass the deep link information in the payload to the Airbridge SDK to collect the deep link event. Set up the Airbridge.trackDeeplink
function.
Add the code below to your custom AppDelegate.
#import "UnityAppController.h"
#import <Airbridge/Airbridge.h>
#import <UserNotifications/UserNotifications.h>
@interface SomeAppController : UnityAppController<UNUserNotificationCenterDelegate>
@end
@implementation SomeAppController
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
UIApplicationState state = UIApplication.sharedApplication.applicationState;
if (state == UIApplicationStateInactive) {
NSURL *url = // Deep links in push notification payloads
Airbridge.trackDeeplink(url)
}
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
UIApplicationState state = UIApplication.sharedApplication.applicationState;
if ((state == UIApplicationStateInactive || state == UIApplicationStateBackground)
&& [response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier]) {
NSURL *url = // Deep links in push notification payloads
Airbridge.trackDeeplink(url)
}
}
IMPL_APP_CONTROLLER_SUBCLASS(SomeAppController)
On Android, this is collected automatically, so no setup is required.
The Airbridge SDK collects deeplink events regardless of the service that created the deeplink, as long as the app is launched by the deeplink. If deeplink events are excessively collected, you can set the Track Airbridge Link Only
of Configure SDK to true so that only Airbridge deep links are collected.
SDK collects Open, Foreground events when a new session is started. It does not collect these events while the session is continued.
By setting the Track In Session Life Cycle Event Enabled
of Configure SDK to true, SDK collects Open, Foreground events while the session is continued.
All collected foreground events are recorded as open events.
To comply with the Digital Markets Act (DMA), you must pass User Response Information (User Consent) to Airbridge. For more information about the DMA and who it applies to, see the Airbridge guide.
If you are in the European Economic Area (EEA), you must always pass User Consent information to Airbridge.
1. Determine the user's region from which they launched your app. If the user launched the app from the EEA(eea=1
), check to see if you already have user response information. If you have collected user response information, proceed to step 3.
If the user launched the app from outside the EEA, you do not need to collect user response information.
Note
Airbridge cannot provide guidance on storing the user consent data and implementing the prompts. For assistance, consult legal professionals.
2. If you don't have any user response information collected, collect user response information from prompts, etc. The information you need to collect in this step is adPersonalization
, adUserData
.
Attention
Advertisers must collect user consent data from all existing and new users in the EEA region at least once starting March 6, 2024.
The table below illustrates the consent data that must be passed to Airbridge. The eea
value is neither the response from the user nor a value automatically filled in by Airbridge. Advertisers should determine the eea
value based on whether the user is in the EEA region and whether the DMA applies or not.
Field Name in Airbridge |
Field Name in Google |
Description |
---|---|---|
<string> |
| Indicates whether the user is in the EEA region and whether the DMA applies or not. The value is neither the response from the user nor a value automatically filled in by Airbridge. Determine the value based on where the user is located and whether the DMA applies or not. Values other than - - |
<string> |
| Indicates whether the user gave Google consent to use their data for ad personalization. Values other than - - |
<string> |
| Indicates whether the user gave consent to pass the user data used for advertising to Google. Values other than - - |
3. Set the Auto Start Tracking Enabled
of Configure SDK to false.
4. Initialise the Airbridge SDK and pass user response information to the Airbridge before collecting user information.
Attention
Take note of the following items.
Use the field names specified by Airbridge:
eea
,adPersonalization
, andadUserData
Input
0
or1
in accordance with the consent data collected.
// Set device alias into Airbridge SDK
// Based on actual region
Airbridge.SetDeviceAlias("eea", "0" /* or "1" */);
// Based on actual user consent
Airbridge.SetDeviceAlias("adPersonalization", "0" /* or "1" */);
Airbridge.SetDeviceAlias("adUserData", "0" /* or "1" */);
// Explicitly start tracking
Airbridge.StartTracking();
You can provide deferred deeplink in Meta Ads in the following way. The Airbridge SDK collects meta-deferred app links first. If there are no meta-deferred app links, it collects Airbridge deferred deep links.
SKAdNetwork campaigns in Meta Ads do not support meta deferred app links.
1. Install the Facebook SDK. See the Meta Ads guide (Unity).
2. Set the Facebook Deferred App Link Enabled
of Configure SDK to true.
Attention
If not activated immediately after the SDK initialization, the Install, Open, Deeplink events may not be collected.
Initializing the Airbridge SDK enables all features. You can initialize the Airbridge SDK with all features disabled by setting the SDK Enabled
of Configure SDK to false.
Or you can check the activation status of the Airbridge SDK in the following way, and you can activate or deactivate all functions.
Airbridge.IsSDKEnabled();
Airbridge.EnableSDK();
Airbridge.DisableSDK();
This is a setting needed for collecting Meta Install Referrer. You send the Facebook App ID to the Meta Install Referrer (Facebook App ID)
of Configure SDK in the SDK initialization stage.
After setting, you need to enter the decryption key on the Airbridge dashboard to view the decrypted Meta Install Referrer. Please refer to the Airbridge guide for how to enter the decryption key.
Airbridge sends a silent push every day between 0:00 and 1:00 KST (Korea Standard Time) to users who have tracked an app event at least once in the last 6 months to check if the app has been deleted. You can check the app deletion event through Airbridge reports and raw data extraction.
Refer to the Airbridge guide for detailed setup methods and explanations.
SDK setup is required to integrate with some third-party solutions. It is recommended to complete the necessary settings for the third-party solution before collecting data with the Airbridge SDK.
Refer to the guide below for the settings required for each third-party solution integration.
The logs provided by the Airbridge SDK are composed of Debug, Info, Warning, Error, and Fault levels. Debug level is the least critical log, and Fault level is the most critical log.
By default, the Airbridge SDK provides logs at the Warning, Error, and Fault level. If you input a log level into the Log Level
of Configure SDK, you can check logs from that log level to the Fault level.
Was this page helpful?
keytool -list -v -keystore YOUR_KEYSTORE.keystore
Certificate fingerprints:
MD5: 4C:65:04:52:F0:3F:F8:65:08:D3:71:86:FC:EF:C3:49
SHA1: C8:BF:B7:B8:94:EA:5D:9D:38:59:FE:99:63:ED:47:B2:D9:5A:4E:CC
SHA256: B5:EF:4D:F9:DC:95:E6:9B:F3:9A:5E:E9:D6:E0:D8:F6:7B:AB:79:C8:78:67:34:D9:A7:01:AB:6A:86:01:0E:99
#import "AirbridgeUnity.h"
- (void)onOpenURL:(NSNotification *)notification {
NSURL* url = notification.userInfo[@"url"];
[Airbridge trackDeeplinkWithUrl:url];
if (AirbridgeUnity.sharedInstance.deeplinkOnReceived == nil) { return; }
AirbridgeUnity.sharedInstance.deeplinkOnReceived(url.absoluteString);
}
- (void)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>>* _Nullable))restorationHandler {
[Airbridge trackDeeplinkWithUserActivity:userActivity];
if (AirbridgeUnity.sharedInstance.deeplinkOnReceived == nil) { return; }
AirbridgeUnity.sharedInstance.deeplinkOnReceived(userActivity.webpageURL.absoluteString);
}
import co.ab180.airbridge.unity.AirbridgeUnity
override fun onResume() {
super.onResume()
AirbridgeUnity.processHandleDeeplink(intent)
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
setIntent(intent)
}
import co.ab180.airbridge.unity.AirbridgeUnity;
@Override
protected void onResume() {
super.onResume();
AirbridgeUnity.processHandleDeeplink(getIntent());
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
Airbridge.SetOnDeeplinkReceived((string deeplink) =>
{
// show proper content using url
});
Airbridge.SetOnDeeplinkReceived((string deeplink) =>
{
// show proper content using url
});
public static void TrackEvent(
string category,
Dictionary<string, object> semanticAttributes = null,
Dictionary<string, object> customAttributes = null
)
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: new Dictionary<string, object>()
{
// action
{ AirbridgeAttribute.ACTION, "Tool" },
// label
{ AirbridgeAttribute.LABEL, "Hammer" },
// value
{ AirbridgeAttribute.VALUE, 10 },
// semantic attribute (provided by sdk)
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
// semantic attribute value (provided by sdk)
{ AirbridgeAttribute.PRODUCT_ID, "12345" },
// semantic attribute value (not provided by sdk)
{ "name", "PlasticHammer" },
},
}
},
// semantic attribute (not provided by sdk)
{ "totalQuantity", 1 }
},
customAttributes: new Dictionary<string, object>()
{
// custom attribute
{ "promotion", "FirstPurchasePromotion" }
}
);
Airbridge.TrackEvent(
category: "event",
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 10 },
},
customAttributes: new Dictionary<string, object>()
{
{ "string", "string" },
{ "number", 1000 },
{ "boolean", true },
{
"object", new Dictionary<string, object>()
{
{ "key", "value" }
}
},
{ "array", new List<object>() { "value" } },
}
);
Airbridge.TrackEvent(
category: "event",
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 10 },
},
customAttributes: new Dictionary<string, object>()
{
{ "string", "string" },
{ "number", 1000 },
{ "boolean", true },
{
"object", new Dictionary<string, object>()
{
{ "key", "value" }
}
},
{ "array", new List<object>() { "value" } },
}
);
// track standard event (provided by sdk)
Airbridge.TrackEvent(AirbridgeCategory.ORDER_COMPLETED);
// track standard event (not provided by sdk)
Airbridge.TrackEvent("airbridge.ecommerce.order.canceled");
// track custom event
Airbridge.TrackEvent("eventViewed");
Airbridge.SetDeviceAlias("string", "string");
Airbridge.RemoveDeviceAlias("string");
Airbridge.ClearDeviceAlias();
Airbridge.SetUserID("string");
Airbridge.SetUserAlias("string", "string");
Airbridge.SetUserEmail("string");
Airbridge.SetUserPhone("string");
Airbridge.SetUserAttribute("string", "string");
Airbridge.TrackEvent(AirbridgeCategory.SIGN_UP);
Airbridge.SetUserID("string");
Airbridge.SetUserAlias("string", "string");
Airbridge.SetUserEmail("string");
Airbridge.SetUserPhone("string");
Airbridge.SetUserAttribute("string", "string");
Airbridge.TrackEvent(AirbridgeCategory.SIGN_IN);
Airbridge.TrackEvent(AirbridgeCategory.SIGN_OUT);
Airbridge.ClearUser();
Airbridge.TrackEvent(AirbridgeCategory.HOME_VIEWED);
Airbridge.TrackEvent(
category: AirbridgeCategory.PRODUCT_LIST_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LIST_ID, "84e6e236-38c4-48db-9b49-16e4cc064386" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SEARCH_RESULTS_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.QUERY, "Plastic" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.PRODUCT_VIEWED,
semanticAttributes: new Dictionary<string, object>()
{
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADD_PAYMENT_INFO,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TYPE, "CreditCard" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADD_TO_WISHLIST,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LIST_ID, "189a2f8b-83ee-4074-8158-726be54e57d4" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ADDED_TO_CART,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.CART_ID, "421eaeb7-6e80-4694-933e-f2e1a55e9cbd" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.INITIATE_CHECKOUT,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "0a7ee1ec-33da-4ffb-b775-89e80e75978a" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 11 },
{ AirbridgeAttribute.TRANSACTION_ID, "8065ef16-162b-4a82-b683-e51aefdda7d5" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.IN_APP_PURCHASED, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ORDER_CANCELED,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 11 },
{ AirbridgeAttribute.TRANSACTION_ID, "8065ef16-162b-4a82-b683-e51aefdda7d5" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.IN_APP_PURCHASED, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "d6ab2fbe-decc-4362-b719-d257a131e91e" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticFork" },
{ AirbridgeAttribute.PRODUCT_PRICE, 1 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.START_TRIAL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "ef1e5271-0370-407c-b1e9-669a8df1dc2c" },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.PERIOD, "P1M" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SUBSCRIBE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 15 },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.TRANSACTION_ID, "cbe718c7-e44e-4707-b5cd-4a6a29f29649" },
{ AirbridgeAttribute.PERIOD, "P1M" },
{ AirbridgeAttribute.IS_RENEWAL, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 0.01 },
{
AirbridgeAttribute.AD_PARTNERS, new Dictionary<string, object>()
{
{
"mopub", new Dictionary<string, object>()
{
{ "app_version", "5.18.0" },
{ "adunit_id", "12345" },
{ "adunit_name", "12345" },
{ "adunit_format", "Banner" },
{ "id", "12345" },
{ "currency", "USD" },
{ "publisher_revenue", 12345.123 },
{ "adgroup_id", "12345" },
{ "adgroup_name", "12345" },
{ "adgroup_type", "12345" },
{ "adgroup_priority", "12345" },
{ "country", "kr" },
{ "precision", "publisher_defined" },
{ "network_name", "12345" },
{ "network_placement_id", "12345" },
{ "demand_partner_data", "12345" },
}
}
}
},
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.UNSUBSCRIBE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 15 },
{ AirbridgeAttribute.CURRENCY, "USD" },
{ AirbridgeAttribute.TRANSACTION_ID, "cbe718c7-e44e-4707-b5cd-4a6a29f29649" },
{ AirbridgeAttribute.IS_RENEWAL, true },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "306a57cb-f653-4220-a208-8405d8e4d506" },
{ AirbridgeAttribute.PRODUCT_NAME, "MusicStreamingMembership" },
{ AirbridgeAttribute.PRODUCT_PRICE, 15 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.AD_CLICK,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.VALUE, 0.01 },
{
AirbridgeAttribute.AD_PARTNERS, new Dictionary<string, object>()
{
{
"mopub", new Dictionary<string, object>()
{
{ "app_version", "5.18.0" },
{ "adunit_id", "12345" },
{ "adunit_name", "12345" },
{ "adunit_format", "Banner" },
{ "id", "12345" },
{ "currency", "USD" },
{ "publisher_revenue", 12345.123 },
{ "adgroup_id", "12345" },
{ "adgroup_name", "12345" },
{ "adgroup_type", "12345" },
{ "adgroup_priority", "12345" },
{ "country", "kr" },
{ "precision", "publisher_defined" },
{ "network_name", "12345" },
{ "network_placement_id", "12345" },
{ "demand_partner_data", "12345" },
}
}
}
},
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.COMPLETE_TUTORIAL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.DESCRIPTION, "Finish Initial Tutorial" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.ACHIEVE_LEVEL,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.LEVEL, 13 },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.UNLOCK_ACHIEVEMENT,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.ACHIEVEMENT_ID, "36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1" },
{ AirbridgeAttribute.DESCRIPTION, "Get Score Over 50" },
{ AirbridgeAttribute.SCORE, 80 },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.RATE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.RATE_ID, "531c64b3-4704-4780-a306-89014ec18daf" },
{ AirbridgeAttribute.RATE, 4.5 },
{ AirbridgeAttribute.MAX_RATE, 5 },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_QUANTITY, 1 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SHARE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.DESCRIPTION, "Share Promotion" },
{ AirbridgeAttribute.SHARED_CHANNEL, "CopyLink" },
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SCHEDULE,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.SCHEDULE_ID, "75712915-2cd9-4e42-a85e-8d42f356f4c6" },
{ AirbridgeAttribute.DATE_TIME, "2024-01-01T00:00:00+00:00" },
{ AirbridgeAttribute.PLACE, "ConferenceRoom" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "abb3e65d-17bc-4b28-89e3-5e356c0ea697" },
{ AirbridgeAttribute.PRODUCT_NAME, "ConferenceRoom" },
},
}
}
}
);
Airbridge.TrackEvent(
category: AirbridgeCategory.SPEND_CREDITS,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.TRANSACTION_ID, "22eb193d-be11-4fe4-95da-c91a196faf1c" },
{
AirbridgeAttribute.PRODUCTS, new List<object>()
{
new Dictionary<string, object>()
{
{ AirbridgeAttribute.PRODUCT_ID, "0117b32a-5a6c-4d4c-b64c-7858e07dba78" },
{ AirbridgeAttribute.PRODUCT_NAME, "PlasticHammer" },
{ AirbridgeAttribute.PRODUCT_PRICE, 10 },
{ AirbridgeAttribute.PRODUCT_CURRENCY, "USD" }
},
}
}
}
);
// ID
Airbridge.SetUserID("testID");
// Alias
Airbridge.SetUserAlias("ADD_YOUR_KEY", "ADD_YOUR_VALUE");
Airbridge.RemoveUserAlias("DELETE_THIS_KEY");
Airbridge.ClearUserAlias();
// Automatically hashed on client side using SHA256
// Can turn off hashing feature with special flag
Airbridge.SetUserEmail("testID@ab180.co");
Airbridge.SetUserPhone("821012341234");
// Attributes
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1L);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1f);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", 1.0);
Airbridge.SetUserAttribute("ADD_YOUR_KEY", "1");
Airbridge.SetUserAttribute("ADD_YOUR_KEY", true);
Airbridge.RemoveUserAttribute("DELETE_THIS_KEY");
Airbridge.ClearUserAttributes();
Airbridge.ClearUser();
Airbridge.Click(
trackingLink: "https://abr.ge/~~~",
onSuccess: () =>
{
// when url is tracking link and succeed
},
onFailure: (Exception e) =>
{
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
);
Airbridge.Impression(
trackingLink: "https://abr.ge/~~~",
onSuccess: () =>
{
// when url is tracking link and succeed
},
onFailure: (Exception e) =>
{
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
);
Airbridge.SetOnAttributionReceived((Dictionary<string, object> result) =>
{
// Process attribution data
});
{
"attributedChannel": "unattributed"
}
#import "UnityAppController.h"
#import <Airbridge/Airbridge.h>
#import <UserNotifications/UserNotifications.h>
@interface SomeAppController : UnityAppController<UNUserNotificationCenterDelegate>
@end
@implementation SomeAppController
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
UIApplicationState state = UIApplication.sharedApplication.applicationState;
if (state == UIApplicationStateInactive) {
NSURL *url = // Deep links in push notification payloads
Airbridge.trackDeeplink(url)
}
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
UIApplicationState state = UIApplication.sharedApplication.applicationState;
if ((state == UIApplicationStateInactive || state == UIApplicationStateBackground)
&& [response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier]) {
NSURL *url = // Deep links in push notification payloads
Airbridge.trackDeeplink(url)
}
}
IMPL_APP_CONTROLLER_SUBCLASS(SomeAppController)
// Set device alias into Airbridge SDK
// Based on actual region
Airbridge.SetDeviceAlias("eea", "0" /* or "1" */);
// Based on actual user consent
Airbridge.SetDeviceAlias("adPersonalization", "0" /* or "1" */);
Airbridge.SetDeviceAlias("adUserData", "0" /* or "1" */);
// Explicitly start tracking
Airbridge.StartTracking();
Airbridge.IsSDKEnabled();
Airbridge.EnableSDK();
Airbridge.DisableSDK();