Install the Airbridge Expo SDK and implement the necessary settings following the steps below.
The Airbridge Expo SDK can be installed using the method below. After installation, you can verify whether the SDK has been properly installed through testing.
Use the npm to install airbridge-expo-sdk
and airbridge-react-native-sdk
.
npm install --save airbridge-expo-sdk
npm install --save airbridge-react-native-sdk
Note
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.
npm install --save airbridge-expo-sdk-restricted
npm install --save airbridge-react-native-sdk-restricted
Add the following code to the app.json
.
{
"expo": {
...
"plugins": [
...
[
"airbridge-expo-sdk",
{
"appName": "APP_NAME",
"appToken": "APP_TOKEN"
}
]
]
}
}
APP_NAME
is the App Name andAPP_TOKEN
is the App SDK Token that can be found on the [Settings]>[Tokens] page in the Airbridge dashboard.
Configure the SDK settings to use the Airbridge Expo SDK.
{
"autoDetermineTrackingAuthorizationTimeoutInSecond": number,
"isHandleAirbridgeDeeplinkOnly" : boolean
}
1. Create an airbridge.json file at the top level of the Expo 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.
Key Value | Reference |
---|---|
autoDetermineTrackingAuthorizationTimeoutInSecond | |
isHandleAirbridgeDeeplinkOnly |
Note
The 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 Expo 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).
When 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 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.
When a user clicks on the Airbridge tracking link, the scheme deep link embedded in the tracking link is converted into an Airbridge Deep Link, which can be either an HTTP deep link or a scheme deep link. This Airbridge Deep Link redirects the user to the desired app location. Then, the Airbridge SDK converts the Airbridge Deep Link back to the original scheme deep link embedded in the tracking link and passes it to the app.
Example scheme deep link embedded in the tracking link: YOUR_SCHEME://product/12345
Examples of Airbridge Deep Links
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=~~~
When the app is installed on the device and the tracking link is clicked, the app opens through the Airbridge Deep Link. The Airbridge SDK converts the Airbridge Deep Link into the scheme deep embedded in the tracking link and passes it to the app.
When the app is not installed on the device and the tracking link is clicked, the Airbridge SDK saves the Airbridge Deep Link. After the user is redirected to the app store or website and the app is installed and launched, the Airbridge SDK converts the saved Airbridge Deep Link into the scheme deep link embedded in the tracking link and passes it to the app.
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.
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 scheme 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 submit the necessary information to the Airbridge dashboard.
1. Navigate 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
, enter demo://
.
3. In the Apple Developer Dashboard, navigate 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. Navigate 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
, enter 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 entering the deep link information into the Airbridge dashboard, an additional setup is required to enable the following.
App launch with Airbridge Deep Links
User redirection with Airbridge Deep Links
For detailed instructions, refer to the information below.
To enable app launch with Airbridge Deep Links, add the following code to the app.json
.
{
"expo": {
...
"scheme": "YOUR_SCHEME",
"android": {
...
"intentFilters": [{
"autoVerify": true,
"action": "VIEW",
"data": { "scheme": "https", "host": "APP_NAME.airbridge.io" },
"category": ["BROWSABLE", "DEFAULT"]
}, {
"autoVerify": true,
"action": "VIEW",
"data": { "scheme": "https", "host": "APP_NAME.deeplink.page" },
"category": ["BROWSABLE", "DEFAULT"]
}, {
"autoVerify": true,
"action": "VIEW",
"data": { "scheme": "http", "host": "APP_NAME.airbridge.io" },
"category": ["BROWSABLE", "DEFAULT"]
}, {
"autoVerify": true,
"action": "VIEW",
"data": { "scheme": "http", "host": "APP_NAME.deeplink.page" },
"category": ["BROWSABLE", "DEFAULT"]
}]
},
"ios": {
...
"associatedDomains": [
"applinks:APP_NAME.airbridge.io",
"applinks:APP_NAME.deeplink.page"
]
}
}
}
YOUR_SCHEME
is the URI Scheme that can be found on the [Tracking Link]>[Deep Links] page in the Airbridge dashboard.
When an Airbridge Deep Link is executed, it is converted into a scheme deep link and passed to the OnDeeplinkReceived
callback. If a deep link that is not an Airbridge Deep Link is executed, the deep link is passed directly to the callback without any conversion.
Use the deep link passed to the callback to redirect the user to the intended destination.
import { Airbridge } from 'airbridge-react-native-sdk'
...
Airbridge.setOnDeeplinkReceived((url) => {
// show proper content using url
})
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.
The Airbridge SDK attempts to collect a deep link after initializing the SDK when all the following conditions are met. If the app is closed during collection, 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
, so no additional setup is required.
The SDK functionality test and deep link test allow you to check whether the SDK and deep linking work as intended.
Follow the instructions below for additional setup.
Attention
Optional settings. Configure only if necessary.
Note
The Airbridge Expo SDK must be v4.2.0 or later.
The deep links passed through the setOnDeeplinkReceived
method of the Airbridge Expo SDK include not only Airbridge Deep Links but also deep links from other solutions.
import { Airbridge } from 'airbridge-react-native-sdk';
...
Airbridge.setOnDeeplinkReceived((url) => {
// show proper content using url
})
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.
Was this page helpful?