Skip to main content
Install the Airbridge React Native SDK and implement the necessary settings following the steps below.

Install SDK

The Airbridge React Native SDK can be installed using the method below. After installation, you can verify whether the SDK has been properly installed through testing.
  1. Use npm to install the airbridge-react-native-sdk.
  1. Use CocoaPods to install the iOS dependency. The Android dependency is installed automatically.

Install Restricted SDK

NoteInstall 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.
  1. Use npm to install airbridge-react-native-sdk-restricted.
  1. Use CocoaPods to install the iOS dependency. The Android dependency is installed automatically.

Initialize SDK

The initialization methods for iOS and Android are different. Refer to the methods described below. Note that the YOUR_APP_NAME and YOUR_APP_SDK_TOKEN can be found on the [Settings]>[Tokens] page in the Airbridge dashboard.

iOS

Add the following code to the ios/YOUR_PROJECT_NAME/AppDelegate.m file.

Android

Add the following code to the android/app/src/main/java/.../MainApplication.kt file.
AttentionWhen issues arise due to Airbridge SDK backup rule merge conflicts, please refer to the backup rule configuration in the troubleshooting guide.

Configure SDK settings

Configure the SDK settings to use the Airbridge React Native SDK.
  1. Create an airbridge.json file at the top level of the React Native project folder, input the JSON as above, and configure the SDK settings.
  2. Don’t input values for keys that are not necessary for your service.
Refer to the links below for detailed guidance on the individual key values.

Configure ATT prompt

NoteThe functions necessary to ensure compliance with privacy policies should be reviewed with legal counsel.
In the iOS environment, the IDFA can only be collected when users provide consent for data tracking through the App Tracking Transparency (ATT) prompt. Event collection should be delayed until the user allows tracking. If the install event is collected before the user allows tracking through the ATT prompt, the install event data will lack an identifier, making performance measurement difficult. We recommend setting a sufficient delay time for event collection to collect identifiers.
  1. Prepare the text you will use in the ATT prompt.
  2. Provide the ATT prompt following this guide provided by Apple.
  3. If the install event is not collected, the Airbridge React Native SDK delays collecting install events for 30 seconds until the user allows tracking each time the app is launched. If the user exits the app before deciding whether to allow tracking, the SDK will not collect the install event and will try again at the next app launch.
In the SDK settings, configure the autoDetermineTrackingAuthorizationTimeoutInSecond to set a sufficient delay time for collecting install events. The default value is 30 seconds, and it can be set to up to 3600 seconds (1 hour).
Recommended time setting for “setAutoDetermineTrackingAuthorizationTimeout” functionWhen using the DeepLink Plan, it is recommended that the setAutoDetermineTrackingAuthorizationTimeout parameter be set to 0 seconds when configuring the ATT prompt.As the DeepLink Plan does not support attribution using identifiers, the setAutoDetermineTrackingAuthorizationTimeout parameter should be set to 0 seconds to seamlessly redirect users who have already installed the app to the intended in-app location as configured in the deferred deep link.

Deep Linking

Deep linking allows you to redirect users from ads to specific locations within your app. The data collected from the tracking link enables you to monitor the performance of the deep link in Airbridge. Airbridge deep linking works in the following 3 steps.
  1. A scheme deep link is embedded in the tracking link.
  2. When the user opens the tracking link, the app opens through an Airbridge Deep Link.
  3. The Airbridge SDK converts the Airbridge Deep Link back to the scheme deep link and passes it to the app.
When the app is not installed, Steps 2 and 3 are deferred until the app is installed. This is called deferred deep linking.
Simple structure of Airbridge Deeplink
Step 1. A scheme deep link is embedded in the tracking link Embed in the tracking link the scheme deep link that takes the user to a specific screen in the app.
  • Example scheme deep link embedded in the tracking link: YOUR_SCHEME://product/12345
For deep linking to work, the app information must first be registered in [Tracking Link]>[Deep Links] of the Airbridge dashboard. Airbridge uses this information to convert deep links and to convert them back. If the registered information does not match the values set in the app, the app does not open or the user is taken to the wrong screen. Refer to Set up deep linking for more information. When creating the tracking link, also set the fallback destination (app market or website) for users who do not have the app installed. Step 2. When the user opens the tracking link, the app opens through an Airbridge Deep Link When the user opens the tracking link, Airbridge does not use the embedded scheme deep link as it is. Instead, Airbridge converts it into an Airbridge Deep Link, the format that opens the app most reliably in the user’s environment (OS, browser, and whether the app is installed), and opens the app with it.
  • HTTP deep link format 1: https://YOUR_APP_NAME.airbridge.io/~~~
  • HTTP deep link format 2: https://YOUR_APP_NAME.abr.ge/~~~
  • Scheme deep link format: YOUR_SCHEME://product/12345?airbridge_referrer=~~~
HTTP deep links work as App Links on Android and Universal Links on iOS, opening the app without an intermediate page. However, some environments such as in-app browsers do not support this method, and a scheme deep link is used in those environments. Airbridge automatically determines which format to use. The app code does not need to branch by format, but the deep linking setup must allow the app to open through all of the formats above. Refer to Set up deep linking for more information. When the app is not installed, Airbridge saves the Airbridge Deep Link. After the user installs and launches the app through the fallback destination, Airbridge passes the saved Airbridge Deep Link to the app. Refer to Set up deferred deep linking for more information. An Airbridge Deep Link contains information about which tracking link the user came through. Airbridge uses this information to measure the ad performance driven by the deep link. Because of this information, the format of an Airbridge Deep Link differs from the scheme deep link embedded in the tracking link. Step 3. The Airbridge SDK converts the Airbridge Deep Link back to the scheme deep link and passes it to the app When the app opens through an Airbridge Deep Link, the Airbridge SDK handles the following 3 tasks.
  1. It determines whether the given deep link is an Airbridge Deep Link.
  2. It collects the information contained in the deep link and sends a deep link event.
  3. It converts the Airbridge Deep Link back to the scheme deep link embedded in the tracking link (YOUR_SCHEME://product/12345) and passes it to the app.
As a result, regardless of which Airbridge Deep Link format opened the app, the app only needs to handle a single scheme deep link, the one embedded in the tracking link. For the SDK to receive the deep link and pass it to the app, deep linking must be set up in the app. Refer to Set up deep linking for more information.

Set up deep linking

For the deep linking setup, the deep link information entered to the Airbridge dashboard and the in-app location address for user redirection is required. First, enter the deep link information into the Airbridge dashboard.
After entering the deep link information into the Airbridge dashboard, an additional setup is required to enable the following.
  • App launch with Airbridge deep links
  • Airbridge deep link event collection
  • User redirection with Airbridge deep links
For detailed instructions, refer to the information below.

Set up deferred deep linking

When a user clicks on a tracking link with deferred deep linking capabilities and your app is not installed on the device, the Airbridge SDK retrieves the deep link as follows.
Deferred deep links are automatically passed to OnDeeplinkReceived, so no additional setup is required.

Testing

The SDK functionality test and deep link test allow you to check whether the SDK and deep linking work as intended.

Additional SDK Settings

Follow the instructions below for additional setup.
AttentionOptional settings. Configure only if necessary.
NoteThe Airbridge React Native SDK must be v4.1.2 or later.
The deep links passed through the setOnDeeplinkReceived method of the Airbridge React Native SDK include not only Airbridge Deep Links but also deep links from other solutions.
By configuring isHandleAirbridgeDeeplinkOnly to true in the SDK settings, only Airbridge Deep Links will be passed to the setOnDeeplinkReceived callback. In this way, you can handle the deep links from other solutions separately from the Airbridge Deep Links.
AttentionReact Native SDK v.4.3.0 or later is required.
Tracking links are links that are embedded to ads for data collection. When users click on the ad, the tracking link is used to pass the touchpoint data to Airbridge, allowing for ad attribution. Also, users who click on the ad with a tracking link can be redirected to a specific destination. Use the createTrackingLink function to create tracking links. Refer to the code examples and the parameter details below.
Use the option parameter in the createTrackingLink function to configure tracking link options.
Use the onSuccess callback in the createTrackingLink function to pass the AirbridgeTrackingLink.
Refer to the example codes below.