Unreal SDK (v4)

    Attention

    This is a guide for the installation and setup of Unreal SDK v4. Please check the Unreal SDK guide for previous versions.

    You can install the Airbridge Unreal SDK and add the necessary settings.

    Install SDK

    Unreal SDK 最低版本指南 1

    Airbridge Unreal SDK 需要 4.23 及以上版本的 Unreal Engine。

    You can install the Airbridge Unreal SDK in the following ways. After installation, you can verify that the SDK is installed correctly by testing the Unreal SDK.

    1. Download the Latest version of the Airbridge Unreal SDK.

    2. Create a Plugins folder in the root directory of your Unreal Engine project.

    3. Move the Airbridge Unreal SDK into the Plugins folder inside the following structure

    123456
    <YOUR_UE_PROJECT>
      ├── Plugins
              └── AirbridgeUnrealSDK
                  ├── Resources
                  ├── Source
                  └── AirbridgeUnrealSDK.uplugin

    4. Enable the Airbridge Unreal SDK by clicking Settings > Plugins in the Unreal Engine toolbar.

    5. Inside your app's Build.cs file(<YOUR_UE_PROJECT>.Build.cs), add AirbridgeUnreal to the PublicDependencyModuleNames array like this

    123456789
    public class <YOUR_UE_PROJECT> : ModuleRules
    {
        public <YOUR_UE_PROJECT>(ReadOnlyTargetRules Target) : base(Target)
        {
            ...
            PublicDependencyModuleNames.AddRange(new string[] { ... , "AirbridgeUnreal" });   // ADD DEPENDENCY 
            ...
        }
    }

    Install Restricted SDK

    提示

    请根据需求选择 General SDK 或 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.

    1. Download the Latest version of the Airbridge Unreal SDK.

    2. Create a Plugins folder in the root directory of your Unreal Engine project.

    3. Move the Airbridge Unreal SDK into the Plugins folder inside the following structure

    123456
    <YOUR_UE_PROJECT>
      ├── Plugins
              └── AirbridgeUnrealSDK
                  ├── Resources
                  ├── Source
                  └── AirbridgeUnrealSDK.uplugin

    4. Enable the Airbridge Unreal SDK by clicking Settings > Plugins in the Unreal Engine toolbar.

    5. Inside your app's Build.cs file(<YOUR_UE_PROJECT>.Build.cs), add AirbridgeUnreal to the PublicDependencyModuleNames array like this

    123456789
    public class <YOUR_UE_PROJECT> : ModuleRules
    {
        public <YOUR_UE_PROJECT>(ReadOnlyTargetRules Target) : base(Target)
        {
            ...
            PublicDependencyModuleNames.AddRange(new string[] { ... , "AirbridgeUnreal" });   // ADD DEPENDENCY 
            ...
        }
    }

    Initialize SDK

    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.

    Configure SDK

    1. Open the Project Settings window in Unreal Engine.

    2. Under the Plugins section, click Airbridge Unreal SDK and you will see the screen below. If you do not need to set any values, please omit the key values.

    See below for a guide to the settings.

    Configure ATT Prompt

    提示

    为确保遵守隐私政策所需的功能,应与法律顾问共同审查。

    In the iOS environment, you can only collect the IDFA as an identifier for users who have consented to collect information in the AppTrackingTransparency(ATT) prompt.

    You should delay collecting the app install event until the user agrees to collect information at the ATT prompt. IDFA is collected with the app install event. If you collect the app install event before the user agrees to collect information, then you can't measure your performance because IDFAs are not collected. We recommend that you time the collection of the app install event to collect IDFAs when the user agrees to the ATT prompt.

    Translated with www.DeepL.com/Translator (free version)

    1. Prepare the wording you use for the ATT prompt.

    2. Follow Apple's guide to set up ATT prompts.

    3. The Airbridge Unreal SDK delays the collection of app install events for 30 seconds each time the app is launched until the user agrees to collect the information if no app install events are collected. If the user exits the app before deciding whether or not to consent to the collection of information, the app install event is not collected and is retried the next time the app is launched.

    You can set a longer delay for collecting installation events with iOS Tracking Authorize Timeout Seconds in Configure SDK. The default setting for iOS Tracking Authorize Timeout Seconds is 300 seconds. You can set it up to 3600 seconds (1 hour).

    注意

    请确保为延迟收集安装事件预留足够时间。在用户通过 ATT 弹窗允许追踪之前,如果延迟时间到期,SDK 将会收集不包含 IDFA 的安装事件。

    SDK Opt-In

    提示

    此功能并非必需功能,请在设置前确认需求。

    Opt-in is a policy where you don't use a user's information until they agree to it.

    After setting Auto Start Tracking Enabled to false in Configure SDK, call the StartTracking function at a time when events can be collected. Events are collected from the time the StartTracking function is called.

    1
    FAirbridge::StartTracking();

    SDK Opt-Out

    提示

    此功能并非必需功能,请在设置前确认需求。

    Opt-Out is a policy that uses user information before the user can opt out.

    After setting Auto Start Tracking Enabled to true in Configure SDK, call the StopTracking function at a point when events cannot be collected. Stop collecting events from the time the StopTracking function is called.

    1
    FAirbridge::StopTracking();

    SDK Signature

    提示

    此功能并非必需功能,请在设置前确认需求。

    SDK Signature prevents SDK spoofing to ensure that only events that have been verified for accuracy and safety can be used to measure ad performance.

    SDK signature settings require SDK signature security information. SDK signature security information includes a secret ID and secret. You can find the required SDK signature security information in the Airbridge dashboard. For more information about SDK signature security information, see the Airbridge guide.

    1. Enter the SDK Signature Secret ID from Configure SDK.

    2. Enter the SDK Signature Secret from Configure SDK.

    The SDK signature security information required to set up the SDK signature is listed below.

    • SDK Signature Secret ID: Secret ID. You can check it in Airbridge dashboard [Rule Management]>[Ad Fraud Verification Rule]>[SDK Signature]>[SDK Signature Security Information].

    • SDK Signature Secret: Secret. You can check it in Airbridge dashboard [Rule Management]> [Ad Fraud Verification Rules]> [SDK Signature]> [SDK Signature Security Information].

    By setting up a deep link, you can send users who click on an ad with a tracking link to a specific page in your app of their choice. You can also see the performance of the deep link in Airbridge based on the information collected by the tracking link.

    Airbridge automatically selects and utilizes the best Airbridge Deeplink for the environment, based on the Scheme Deeplink used for the user's movement, while creating the tracking link.

    Example)

    • Airbridge deep link: https://YOUR_APP_NAME.airbridge.io/~~~

    • Scheme deep link: YOUR_SCHEME://product/12345

    With the app installed, when a user opens a tracking link, the app opens with an Airbridge deep link. The Airbridge SDK converts the Airbridge deep link to the scheme deep link set in the tracking link. The converted scheme deep link is passed to the app.

    When the app is not installed, it saves the Airbridge deep link when a user opens the tracking link. When the app is installed and launched after going to the app store or website, the Airbridge SDK converts the stored Airbridge deep link to a scheme deep link. The converted scheme deep link is passed to the app.

    Set up a deep link. You'll need the information you set up in the Airbridge dashboard and the app page address used as the destination for the user.

    First, register your deep link information with Airbridge.

    After you register your deep link information with Airbridge, you need to set up deep linking in your app. The development required for deep linking in your app is described below.

    • Enable your app to launch with an Airbridge deep link.

    • Collect Airbridge deep links from apps.

    • Sends the user to an Airbridge deep link.

    See below.

    When you click a tracking link with deferred deep linking enabled without the app installed, the Airbridge deep link is saved. When you set up deferred deep linking, the Airbridge SDK acquires the deep link in the following ways

    Deferred deep links are automatically passed to the onDeeplinkReceived callback, so you don't need to set anything up.

    In-app events

    The Airbridge SDK collects certain user actions in your service, depending on your settings, and sends them as in-app events.

    Send In-App Events

    Setting up a Hybrid App

    You can set up the Unreal SDK to handle Airbridge-related work occurring on in-app websites in hybrid apps without changing the website code.

    To send an event, you need to call the Airbridge.TrackEvent function. The Airbridge.TrackEvent function components are required and their types are shown below.

    12345
    static void TrackEvent(
    	const FString& Category,
    	const UAirbridgeMap* SemanticAttributes = nullptr,
    	const UAirbridgeMap* CustomAttributes = nullptr
    );

    Name

    Required

    Type

    Description

    category

    Required

    String

    Name of the event

    semanticAttributes

    Optional

    UAirbridgeMap

    Semantic attributes of events

    customAttributes

    Optional

    UAirbridgeMap

    Custom attributes of events

    Below you'll find the definition of each component and the strings you can use.

    The standard event categories and semantic attributes provided by the SDK are listed below.

    See the example code for each data type below.

    1234567891011
    FAirbridge::TrackEvent(
        "event",
        UAirbridgeMap::CreateObject()
            ->Set(AirbridgeAttribute::VALUE, 10),
        UAirbridgeMap::CreateObject()
            ->Set("string", "string")
            ->Set("number", 1000)
            ->Set("boolean", true)
            ->Set("object", UAirbridgeMap::CreateObject()->Set("key", "value"))
            ->Set("array", UAirbridgeList::CreateObject()->Add("value"))
    );

    Set Additional In-App Event settings

    提示

    如果未配置其他设置,则将应用默认设置。请查看是否需要其他设置后再继续。

    You can add the necessary settings for the in-app events that you send.

    Example Code

    The main in-app events that Airbridge collects are standard events and custom events. Standard events are events defined by Airbridge. See the example code below.

    A custom event is a newly defined user behavior that does not fit into a standard event to track ad performance specific to your app service. See the example code below.

    1234567891011
    FAirbridge::TrackEvent(
        "event",
        UAirbridgeMap::CreateObject()
            ->Set(AirbridgeAttribute::VALUE, 10),
        UAirbridgeMap::CreateObject()
            ->Set("string", "string")
            ->Set("number", 1000)
            ->Set("boolean", true)
            ->Set("object", UAirbridgeMap::CreateObject()->Set("key", "value"))
            ->Set("array", UAirbridgeList::CreateObject()->Add("value"))
    );

    User Information

    Send user information in the event. With this user information, you can better analyze the performance of your ads across web and apps.

    Set User ID

    The user ID is the user identifier utilized by the service. The user ID must be a unique ID that identifies the user as a single user across web and apps.

    #{"width":"140px"}

    Function

    #{"width":"240px"}

    Description

    FAirbridge::SetUserID

    Set your user ID.

    FAirbridge::ClearUserID

    Clear the user ID.

    FAirbridge::SetUserAlias

    Enter additional user identifiers. You can enter up to 10.
    - key: Up to 128 characters. Must satisfy the regular expression ^[a-zA-Z_][a-zA-Z0-9_]*$.
    - value: Up to 1024 characters.

    FAirbridge::RemoveUserAlias

    Remove the specified identifier from the additional user identifiers you entered.

    FAirbridge::ClearUserAlias

    Clear any additional user identifiers you entered.

    See the example below.

    1234567
    // ID
    FAirbridge::SetUserID("testID");
    
    // Alias
    FAirbridge::SetUserAlias("ADD_YOUR_KEY", "ADD_YOUR_VALUE");
    FAirbridge::RemoveUserAlias("DELETE_THIS_KEY");
    FAirbridge::ClearUserAlias();

    Set Additional User Information

    注意

    可能包含敏感的用户信息。发送前请咨询法律顾问。

    You can send additional user information by setting user attributes.

    #{"width":"140px"}

    Function

    #{"width":"240px"}

    Description

    FAirbridge::SetUserEmail

    Enter the user email. It is hashed with SHA256.

    FAirbridge::ClearUserEmail

    Clear the user's email.

    FAirbridge::SetUserPhone

    Enter the user's phone number. It is hashed with SHA256.

    FAirbridge::ClearUserPhone

    Clear the user's phone.

    FAirbridge::SetUserAttribute

    Enter additional user attributes. You can enter up to 100.
    - key: Up to 128 characters. Must satisfy the regular expression ^[a-zA-Z_][a-zA-Z0-9_]*$.
    - value: Only supports String, Number, and Boolean types. Maximum of 1024 characters.

    FAirbridge::RemoveUserAttribute

    Delete the specified attribute from the additional user attributes you entered.

    FAirbridge::ClearUserAttributes

    Clear any additional user attributes you entered.

    See the example below.

    1234567891011121314
    // Automatically hashed on client side using SHA256
    // Can turn off hashing feature with special flag
    FAirbridge::SetUserEmail("testID@ab180.co");
    FAirbridge::SetUserPhone("821012341234");
    
    // Attributes
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", 1);
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", 1L);
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", 1f);
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", 1.0);
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", "1");
    FAirbridge::SetUserAttribute("ADD_YOUR_KEY", true);
    FAirbridge::RemoveUserAttribute("DELETE_THIS_KEY");
    FAirbridge::ClearUserAttributes();

    Hash user information

    Setting User Info Hash Enabled to false in Configure SDK will send user emails and phone numbers without hashing them. The default setting is true.

    Reset User Information

    You can initialize user information with the FAirbridge::ClearUser function.

    提示

    此功能并非必需功能,请在设置前确认需求。

    Additional SDK settings

    You can make additional settings for the Unreal SDK.

    提示

    此功能并非必需功能,请在设置前确认需求。

    The deep links received through the FAirbridge::SetOnDeeplinkReceived method of the Airbridge Unreal SDK include not only Airbridge deep links but also deep links from other solutions.

    ExampleGameModeBase.cpp
    1234567891011121314
    ...
    #include "AirbridgeUnreal.h"
    
    void AExampleGameModeBase::BeginPlay()
    {
        ...
        
        FAirbridge::SetOnDeeplinkReceived([](const FString& Url)
        {
            // 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 utilize the app's tracking link in-app.

    The FAirbridge::Click function or FAirbridge::Impression function allows you to utilize tracking links normally, bypassing the external browser.

    Attention

    如果在 Airbridge iOS SDK 1.24.0 及以上版本的 App 中使用追踪链接,将记录 “深度链接页面浏览(Deeplink Pageview)” 目标事件(Target Event)。如果深度链接页面浏览频繁随后深度链接打开(Deeplink Open)发生,可能会影响深度链接打开的绩效。

    深度链接页面浏览的的默认归因窗口为 3 天。如果希望更改此归因窗口,请联系您的 CSM。

    Utilize Attribution Results

    注意

    Airbridge SDK 收集归因结果需要时间,因此不建议将归因结果用于需要实时处理的功能。

    You can get attribution results for installation events with the FAirbridge::SetOnAttributionReceived function.

    123456
    static void OnReceived(TMap<FString, FString> Attribution) {  }
    
    void SomeFunction() 
    { 
        FAirbridge::SetOnAttributionReceived(OnReceived);
    }

    Depending on whether the attribution result exists, a value is passed as shown below.

    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 FAirbridge::trackDeeplink function.

    iOS

    Add the code below to your custom AppDelegate.

    123456789101112131415161718192021222324252627282930
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
    #import <Airbridge/Airbridge.h>
    #import <UserNotifications/UserNotifications.h>
    
    @interface SomeAppDelegate : NSObject <UIApplicationDelegate, UNUserNotificationCenterDelegate>
    
    @end
    
    @implementation SomeAppDelegate
    
    - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
        UIApplicationState state = UIApplication.sharedApplication.applicationState;
        if (state == UIApplicationStateInactive) {
            NSURL *url = // 푸시 알림 페이로드의 딥링크
            
            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 = // 푸시 알림 페이로드의 딥링크
            
            Airbridge.trackDeeplink(url)
        }
    }
    

    The Airbridge SDK collects deep link events when an app is launched with a deep link, regardless of the service that generated the deep link. If you find that you are collecting too many deep link events, you can set Track Airbridge Link Only to true in Configure SDK to collect only airbridge deep links.

    Collect In-Session Lifecycle Events

    The Airbridge SDK collects Open and Foreground events that start a new session. It does not collect these events while the session is persisted.

    Setting Track In Session Life Cycle Event Enabled to true in Configure SDK allows you to collect Open and Foreground events while the session is persisted.

    Any foreground events collected are logged as running (Open) events.

    Compliance with Google DMA

    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, please see the Airbridge guide.

    If you are in the European Economic Area (EEA), you must always pass information to Airbridge about whether the user is in the European Economic Area and the user's response.

    1. Check the region of the user who launched the app. If the user launched the app from the EEA (eea=1), check to see if you already have collected user response information. If you have collected user response information, then proceed to step 3.
    If the user launched the app from outside the EEA, then you don't need to collect user response information.

    Translated with www.DeepL.com/Translator (free version)

    提示

    Airbridge 无法提供有关存储用户同意信息或实现同意弹窗的指导。请咨询法律顾问。

    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.

    3. Set Auto Start Tracking Enabled to false in Configure SDK.

    4. Initialize the Airbridge SDK and pass user response information to Airbridge before collecting user information.

    注意

    • 必须为 eeaadPersonalizationadUserData 使用相同的名称。

    • 请根据收集的信息正确输入 01

    Unreal - Set Device Alias
    1234567891011
    // Set device alias into Airbridge SDK
    
    // Based on actual region
    FAirbridge::SetDeviceAlias("eea", "0" /* or "1" */);
    
    // Based on actual user consent
    FAirbridge::SetDeviceAlias("adPersonalization", "0" /* or "1" */);
    FAirbridge::SetDeviceAlias("adUserData", "0" /* or "1" */);
    
    // Explicitly start tracking
    FAirbridge::StartTracking();

    You can serve deferred deep links in Meta Ads in the following ways The Airbridge SDK collects meta deferred app links first. If there is no meta deferred app link, it collects the Airbridge deferred deep link.

    SKAdNetwork campaigns in Meta Ads do not support meta deferred app links.

    1. Install the Facebook SDK. Refer to the Meta Ads Guide (iOS).

    2. in Configure SDK, set Facebook Deferred App Link Enabled to true.

    Initialize the Airbridge SDK in Deactivation Mode

    注意

    如果 Airbridge SDK 在初始化后未立即启用,则可能无法收集安装(Install)、打开(Open)、深度链接(Deeplink)事件。

    Initializing the Airbridge SDK enables all features. You can initialize the Airbridge SDK with all features disabled by setting SDK Enabled to false in Configure SDK.

    Alternatively, you can check whether the Airbridge SDK is enabled and enable or disable all features in the following ways

    123
    FAirbridge::IsSDKEnabled();
    FAirbridge::EnableSDK();
    FAirbridge::DisableSDK();

    Meta Install Referrer collection settings

    This setting is required for Meta Install Referrer collection. During the SDK initialization step, pass your Facebook App ID to Meta Install Referrer (Facebook App ID) in Configure SDK.

    Once set up, you'll need to enter the decryption key into the Airbridge dashboard to view the decrypted meta-install referrer. For instructions on how to enter the decryption key, see the Airbridge guide on .

    Set Up Uninstall Event Tracking

    Airbridge sends a silent push to users whose app events have been tracked at least once in the last six months, every day between 0:00 and 1:00 KST, to check for app uninstalls. App deletion events can be viewed in Airbridge reports and by extracting the original data.

    For detailed setup instructions and explanations, see the Airbridge guide.

    Integrate with Third-party Solutions

    Some third-party solutions require SDK setup to integrate. We recommend that you complete the necessary setup for your third-party solution before collecting data with the Airbridge SDK.

    Refer to the guides below for the settings required for each third-party solution integration.

    SDK Log Setting

    The logs provided by the Airbridge SDK are organized into Debug, Info, Warning, Error, and Fault levels. The Debug level is the least critical log, and the Fault level is the most critical log.

    The Airbridge SDK provides logs above the Warning, Error, and Fault levels by default. You can view logs from that log level up to the Fault level by entering a log level in Log Level in Configure SDK.

    Was this page helpful?

    Have any questions or suggestions?