This article contains the information required to update the Airbridge React Native SDK. We recommend checking the information regarding all versions.
Check the information below when updating the Airbridge React Native SDK to v4.0.
airbridge.json (v2) | airbridge.json (v4) | Change |
---|---|---|
- | sdkEnabled | New features have been added. |
logLevel | logLevel | - |
autoStartTrackingEnabled | autoStartTrackingEnabled | - |
trackingAuthorizeTimeoutSeconds | autoDetermineTrackingAuthorizationTimeoutInSecond | The name has been changed. |
facebookDeferredAppLinkEnabled | trackMetaDeferredAppLinkEnabled | The name has been changed. |
sessionTimeoutSeconds | sessionTimeoutInSecond | The name has been changed. |
metaInstallReferrer | metaInstallReferrerAppID | The name has been changed. |
trackAirbridgeLinkOnly | trackAirbridgeDeeplinkOnlyEnabled | The name has been changed. |
- | trackInSessionLifecycleEventEnabled | New features have been added. |
userInfoHashEnabled | hashUserInformationEnabled | The name has been changed. |
sdkSignatureSecretID | sdkSignatureID | The name has been changed. |
sdkSignatureSecret | sdkSignatureSecret | The name has been changed. |
- | clearEventBufferOnInitializeEnabled | New features have been added. |
- | eventBufferCountLimit | New features have been added. |
- | eventBufferSizeLimitInGibibyte | New features have been added. |
- | eventTransmitIntervalInSecond | New features have been added. |
Airbridge (v2) | Airbridge (v4) | Change |
---|---|---|
state.setAttributionListener | setOnAttributionReceived | The name has been changed. |
deeplink.setDeeplinkListener | setOnDeeplinkReceived | The name has been changed. |
event.trackEvent | trackEvent | The name has been changed. Method of inserting attributes is changed. |
state.deviceUUID | fetchDeviceUUID | The name has been changed. DeviceUUID is now returned with callback. |
- | fetchAirbridgeGeneratedUUID | New features have been added. |
- | isUninstallTrackingNotification | New features have been added. |
placement.click | click | The name has been changed. Callback feature is added. |
placement.impression | impression | The name has been changed. Callback feature is added. |
state.setUser | - | Replaced with User related functions. |
state.updateUser | - | Replaced with User related functions. |
- | setUserID | New features have been added. |
- | clearUserID | New features have been added. |
- | setUserEmail | New features have been added. |
- | clearUserEmail | New features have been added. |
- | setUserPhone | New features have been added. |
- | clearUserPhone | New features have been added. |
- | setUserAttribute | New features have been added. |
- | removeUserAttribute | New features have been added. |
- | clearUserAttributes | New features have been added. |
- | setUserAlias | New features have been added. |
- | removeUserAlias | New features have been added. |
- | clearUserAlias | New features have been added. |
- | clearUser | New features have been added. |
setDeviceAlias | setDeviceAlias | - |
removeDeviceAlias | removeDeviceAlias | - |
clearDeviceAlias | clearDeviceAlias | - |
registerPushToken | registerPushToken | - |
- | enableSDK | New features have been added. |
- | disableSDK | New features have been added. |
- | isSDKEnabled | New features have been added. |
state.startTracking | startTracking | The name has been changed. |
- | stopTracking | New features have been added. |
- | isTrackingEnabled | New features have been added. |
createWebInterface | - | Replaced with WebInterface related functions. |
- | createWebInterfaceScript | New features have been added. |
- | handleWebInterfaceCommand | New features have been added. |
AirbridgeCategory (v2) | AirbridgeCategory (v4) | Change |
---|---|---|
SIGN_UP | SIGN_UP | - |
SIGN_IN | SIGN_IN | - |
SIGN_OUT | SIGN_OUT | - |
HOME_VIEWED | HOME_VIEWED | - |
PRODUCT_LIST_VIEWED | PRODUCT_LIST_VIEWED | - |
SEARCH_RESULTS_VIEWED | SEARCH_RESULTS_VIEWED | - |
PRODUCT_VIEWED | PRODUCT_VIEWED | - |
ADD_PAYMENT_INFO | ADD_PAYMENT_INFO | - |
ADD_TO_WISHLIST | ADD_TO_WISHLIST | - |
ADDED_TO_CART | ADDED_TO_CART | - |
INITIATE_CHECKOUT | INITIATE_CHECKOUT | - |
ORDER_COMPLETED | ORDER_COMPLETED | - |
ORDER_CANCELED | ORDER_CANCELED | - |
START_TRIAL | START_TRIAL | - |
SUBSCRIBE | SUBSCRIBE | - |
UNSUBSCRIBE | UNSUBSCRIBE | - |
AD_IMPRESSION | AD_IMPRESSION | - |
AD_CLICK | AD_CLICK | - |
COMPLETE_TUTORIAL | COMPLETE_TUTORIAL | - |
ACHIEVE_LEVEL | ACHIEVE_LEVEL | - |
UNLOCK_ACHIEVEMENT | UNLOCK_ACHIEVEMENT | - |
RATE | RATE | - |
SHARE | SHARE | - |
SCHEDULE | SCHEDULE | - |
SPEND_CREDITS | SPEND_CREDITS | - |
AirbridgeAttributes (v2) | AirbridgeAttribute (v4) | Change |
---|---|---|
- | ACTION | New features have been added. |
- | LABEL | New features have been added. |
- | VALUE | New features have been added. |
TOTAL_VALUE | - | The feature has been removed. Please enter in VALUE. |
CURRENCY | CURRENCY | - |
ORIGINAL_CURRENCY | ORIGINAL_CURRENCY | - |
PRODUCTS | PRODUCTS | - |
PERIOD | PERIOD | - |
IS_RENEWAL | IS_RENEWAL | - |
RENEWAL_COUNT | RENEWAL_COUNT | - |
PRODUCT_LIST_ID | PRODUCT_LIST_ID | - |
CART_ID | CART_ID | - |
TRANSACTION_ID | TRANSACTION_ID | - |
TRANSACTION_TYPE | TRANSACTION_TYPE | - |
TRANSACTION_PAIRED_EVENT_CATEGORY | TRANSACTION_PAIRED_EVENT_CATEGORY | - |
TRANSACTION_PAIRED_EVENT_TIMESTAMP | TRANSACTION_PAIRED_EVENT_TIMESTAMP | - |
TOTAL_QUANTITY | TOTAL_QUANTITY | - |
QUERY | QUERY | - |
IN_APP_PURCHASED | IN_APP_PURCHASED | - |
CONTRIBUTION_MARGIN | CONTRIBUTION_MARGIN | - |
ORIGINAL_CONTRIBUTION_MARGIN | ORIGINAL_CONTRIBUTION_MARGIN | - |
LIST_ID | LIST_ID | - |
RATE_ID | RATE_ID | - |
RATE | RATE | - |
MAX_RATE | MAX_RATE | - |
ACHIEVEMENT_ID | ACHIEVEMENT_ID | - |
SHARED_CHANNEL | SHARED_CHANNEL | - |
DATE_TIME | DATE_TIME | - |
DESCRIPTION | DESCRIPTION | - |
IS_REVENUE | IS_REVENUE | - |
PLACE | PLACE | - |
SCHEDULE_ID | SCHEDULE_ID | - |
TYPE | TYPE | - |
LEVEL | LEVEL | - |
SCORE | SCORE | - |
AD_PARTNERS | AD_PARTNERS | - |
IS_FIRST_PER_USER | IS_FIRST_PER_USER | - |
AirbridgeProduct (v2) | AirbridgeAttribute (v4) | Change |
---|---|---|
PRODUCT_ID | PRODUCT_ID | - |
PRODUCT_NAME | PRODUCT_NAME | - |
PRODUCT_PRICE | PRODUCT_PRICE | - |
PRODUCT_QUANTITY | PRODUCT_QUANTITY | - |
PRODUCT_CURRENCY | PRODUCT_CURRENCY | - |
PRODUCT_POSITION | PRODUCT_POSITION | - |
PRODUCT_CATEGORY_ID | PRODUCT_CATEGORY_ID | - |
PRODUCT_CATEGORY_NAME | PRODUCT_CATEGORY_NAME | - |
PRODUCT_BRAND_ID | PRODUCT_BRAND_ID | - |
PRODUCT_BRAND_NAME | PRODUCT_BRAND_NAME | - |
AirbridgeRN (v2) | AirbridgeReactNative (v4) | Change |
---|---|---|
getInstance | initializeSDK | The name has been changed. |
deeplink.handleURLSchemeDeeplink | trackDeeplink | The name has been changed. |
deeplink.handleUserActivity | trackDeeplink | The name has been changed. |
AirbridgeRN (v2) | AirbridgeReactNative (v4) | Change |
---|---|---|
init | initializeSDK | The name has been changed. |
processDeeplinkData | trackDeeplink | The name has been changed. |
setLifecycleIntegration | - |
The key values of airbridge.json have been changed. Change the key values as follows.
airbridge.json (v2) | airbridge.json (v4) |
---|---|
trackingAuthorizeTimeoutSeconds | autoDetermineTrackingAuthorizationTimeoutInSecond |
facebookDeferredAppLinkEnabled | trackMetaDeferredAppLinkEnabled |
sessionTimeoutSeconds | sessionTimeoutInSecond |
metaInstallReferrer | metaInstallReferrerAppID |
trackAirbridgeLinkOnly | trackAirbridgeDeeplinkOnlyEnabled |
userInfoHashEnabled | hashUserInformationEnabled |
sdkSignatureSecretID | sdkSignatureID |
sdkSignatureSecret | sdkSignatureSecret |
The AirbridgeRN.getInstance
function in iOS has been replaced with the AirbridgeReactNative.initializeSDK
function. Modify the ios/YOUR_PROJECT_NAME/AppDelegate.m
file.
- import <AirbridgeRN/AirbridgeRN.h>
- ...
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- [AirbridgeRN getInstance:@"YOUR_APP_SDK_TOKEN" appName:@"YOUR_APP_NAME" withLaunchOptions:launchOptions];
- ...
- }
+ import <AirbridgeReactNative/AirbridgeReactNative.h>
+ ...
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [AirbridgeReactNative initializeSDKWithName:@"YOUR_APP_NAME" token:@"YOUR_APP_SDK_TOKEN"];
+ ...
+ }
The AirbridgeRN.init
function in Android has been replaced with the AirbridgeReactNative.initializeSDK
function. Modify the android/app/src/main/java/.../MainApplication.kt
file.
- import co.ab180.airbridge.reactnative.AirbridgeRN;
- ...
- override fun onCreate() {
- super.onCreate()
- AirbridgeRN.init(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
- ...
- }
+ import co.ab180.airbridge.reactnative.AirbridgeReactNative
+ ...
+ override fun onCreate() {
+ super.onCreate()
+ AirbridgeReactNative.initializeSDK(this, "YOUR_APP_NAME", "YOUR_APP_SDK_TOKEN")
+ ...
+ }
The Airbridge.setDeeplinkListener
function has been replaced with the Airbridge.setOnDeeplinkReceived
function.
- import Airbridge from 'airbridge-react-native-sdk'
- ...
- Airbridge.setDeeplinkListener((url) => {
- // show proper content
- })
+ import { Airbridge } from 'airbridge-react-native-sdk'
+ ...
+ Airbridge.setOnDeeplinkReceived((url) => {
+ // show proper content
+ })
In iOS, the AirbridgeRN.deeplink.handleURLSchemeDeeplink
, AirbridgeRN.deeplink.handleUserActivity
functions have been replaced with the AirbridgeReactNative.trackDeeplink
function.
- import <AirbridgeRN/AirbridgeRN.h>
- ...
- (BOOL)application:(UIApplication *)application
- openURL:(NSURL *)url
- options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options
- {
- [AirbridgeRN.deeplink handleURLSchemeDeeplink:url];
- return YES;
- }
-
- - (BOOL)application:(UIApplication *)application
- continueUserActivity:(NSUserActivity *)userActivity
- restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
- {
- [AirbridgeRN.deeplink handleUserActivity:userActivity];
- return YES;
- }
+ import <AirbridgeReactNative/AirbridgeReactNative.h>
+ ...
+ - (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options
+ {
+ [AirbridgeReactNative trackDeeplinkWithUrl:url];
+ return YES;
+ }
+
+ - (BOOL)application:(UIApplication *)application
+ continueUserActivity:(NSUserActivity *)userActivity
+ restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
+ {
+ [AirbridgeReactNative trackDeeplinkWithUserActivity:userActivity];
+ return YES;
+ }
In Android, the AirbridgeRN.deeplink.processDeeplinkData
function have been replaced with the AirbridgeReactNative.trackDeeplink
function.
- import co.ab180.airbridge.reactnative.AirbridgeRN
- ...
- override fun onResume() {
- super.onResume()
- AirbridgeRN.processDeeplinkData(intent)
- }
+ import co.ab180.airbridge.reactnative.AirbridgeReactNative
+ ...
+ override fun onResume() {
+ super.onResume()
+ AirbridgeReactNative.trackDeeplink(intent)
+ }
The function Airbridge.event.trackEvent has been replaced with Airbridge.trackEvent.
Please change the function Airbridge.event.trackEvent to Airbridge.trackEvent following the example code below.
- import Airbridge, { AirbridgeAttributes } from 'airbridge-react-native-sdk'
- ...
- Airbridge.event.trackEvent('event', {
- action: '...',
- label: '...',
- value: 100,
- semanticAttributes: {
- [AirbridgeAttributes.QUERY]: '...',
- },
- customAttributes: {
- 'key1': '...',
- 'key2': '...',
- 'key3': '...',
- },
- })
+ import { Airbridge, AirbridgeAttribute } from 'airbridge-react-native-sdk'
+ ...
+ Airbridge.trackEvent('event', {
+ [AirbridgeAttribute.ACTION]: '...',
+ [AirbridgeAttribute.LABEL]: '...',
+ [AirbridgeAttribute.VALUE]: 100,
+ [AirbridgeAttribute.QUERY]: '...',
+ }, {
+ 'key1': '...',
+ 'key2': '...',
+ 'key3': '...',
+ })
Attention
The
action
,label
,value
,semanticAttributes
values, which are in the second parameter of theAirbridge.event.trackEvent
function must be included in the second parameter of theAirbridge.trackEvent
function.The
customAttributes
value, which is the second parameter of theAirbridge.event.trackEvent
function must be included in the third parameter of theAirbridge.trackEvent
function.
The functions Airbridge.state.setUser
and Airbridge.state.updateUser
have been replaced with the Airbridge.setUser related functions. The setUser
, updateUser
functions, which set user information all at once, are no longer supported.
- import Airbridge from 'airbridge-react-native-sdk'
- ...
- Airbridge.state.setUser({ ID: '...', email: '...' })
- Airbridge.state.updateUser({ phone: '...' })
+ import { Airbridge } from 'airbridge-react-native-sdk'
+ ...
+ Airbridge.setUserID('...')
+ Airbridge.setUserEmail('...')
+ Airbridge.setUserPhone('...')
The Airbridge.setAttributionListener
function has been replaced with the Airbridge.SetOnAttributionReceived
function.
- import Airbridge from 'airbridge-react-native-sdk'
- ...
- Airbridge.setAttribuitonListener((attribution) => {
- // using attribution
- })
+ import { Airbridge } from 'airbridge-react-native-sdk'
+ ...
+ Airbridge.setOnAttributionReceived((attribution) => {
+ // using attribution
+ })
The Airbridge.placement.click
, Airbridge.placement.impression
functions have been replaced with the Airbridge.click
, Airbridge.impression
functions.
- import Airbridge from 'airbridge-react-native-sdk'
- ...
- Airbridge.placement.click(url)
- Airbridge.placement.impression(url)
+ import { Airbridge } from 'airbridge-react-native-sdk'
+ ...
+ Airbridge.click(url)
+ Airbridge.impression(url)
The Airbridge.createWebInterface
function has been replaced with the Airbridge.createWebInterfaceScript
, Airbridge.handleWebInterfaceCommand
functions.
- import Airbridge from 'airbridge-react-native-sdk'
- ...
- const { script, handle } = Airbridge.createWebInterface(
- 'YOUR_WEB_TOKEN',
- (command) => {
- return `window.ReactNativeWebView.postMessage(${command})`
- },
- )
- <WebView
- source={{ uri: 'https://...' }}
- onMessage={(command) => { handle(command) }}
- injectedJavaScript={script} />
+ import { Airbridge } from 'airbridge-react-native-sdk'
+ ...
+ const script = await Airbridge.createWebInterface(
+ 'YOUR_WEB_TOKEN',
+ 'window.ReactNativeWebView.postMessage(payload)',
+ )
+ <WebView
+ source={{ uri: 'https://...' }}
+ onMessage={(command) => { Airbridge.handleWebInterfaceCommand(command) }}
+ injectedJavaScript={script} />
See the major changes in each version of the React Native SDK.
For Airbridge Apps created after September 4, 2023, an issue where the deep link URL provided in the deep link callback was decoded twice from the content entered in the Airbridge dashboard has been resolved. This issue was found in versions v2.7.3 to v2.5.1.
For Airbridge Apps created after September 4, 2023, the "airbridge_referrer" will no longer be added to the deep link URL provided in the deep link callback.
In the case of an iOS app update, the last calculated SKAdNetwork Conversion Value is finalized. No additional calculations are processed.
In versions earlier than v2.5.1, the SKAdNetwork Conversion Value is only calculated for up to 24 hours.
This does not affect users who newly installed the app.
deeplink.page
has been deprecated. From v2.5.1, we recommend writing code using the deep link domain, abr.ge
.
deeplink.page
will still be supported and functioning for backward compatibility.
The default value for trackingAuthorizeTimeout
has been changed to 30 seconds.
Was this page helpful?