Skip to content

Commit 8d9e110

Browse files
authored
feat: add unified DL support to appsflyer (#756)
* feat: add unifiedDL support to appsflyer * fix: remove additional flag for dl callbacks --------- Co-authored-by: Alan Charles <[email protected]>
1 parent 656ab6d commit 8d9e110

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,10 @@ PODS:
298298
- React
299299
- RNGestureHandler (2.6.0):
300300
- React-Core
301-
- segment-analytics-react-native (2.10.0):
301+
- segment-analytics-react-native (2.11.0):
302302
- React-Core
303303
- sovran-react-native
304-
- segment-analytics-react-native-plugin-idfa (0.5.0):
304+
- segment-analytics-react-native-plugin-idfa (0.6.0):
305305
- React-Core
306306
- sovran-react-native (0.4.5):
307307
- React-Core
@@ -478,8 +478,8 @@ SPEC CHECKSUMS:
478478
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
479479
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
480480
RNGestureHandler: 920eb17f5b1e15dae6e5ed1904045f8f90e0b11e
481-
segment-analytics-react-native: 64c117fa7c8e265ca4a3b170e396b88c34cd41e7
482-
segment-analytics-react-native-plugin-idfa: 00f56afe6a185acad542caf00485fa0c35b53c47
481+
segment-analytics-react-native: 2ba71e946824d44bea9a9001a911c3fcf84f0b16
482+
segment-analytics-react-native-plugin-idfa: c9335ec0327b8f5f35c78bbf0bf7821e9137537e
483483
sovran-react-native: fd3dc8f1a4b14acdc4ad25fc6b4ac4f52a2a2a15
484484
Yoga: 0b84a956f7393ef1f37f3bb213c516184e4a689d
485485

packages/core/src/info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export const libraryInfo = {
22
name: '@segment/analytics-react-native',
3-
version: '2.10.1',
3+
version: '2.11.0',
44
};

packages/plugins/plugin-appsflyer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@segment/analytics-react-native": "*"
4949
},
5050
"dependencies": {
51-
"react-native-appsflyer": "^6.3.50"
51+
"react-native-appsflyer": "^6.9.4"
5252
},
5353
"devDependencies": {
5454
"@semantic-release/changelog": "^6.0.1",

packages/plugins/plugin-appsflyer/src/AppsflyerPlugin.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export class AppsflyerPlugin extends DestinationPlugin {
5151
!this.hasRegisteredDeepLinkCallback
5252
) {
5353
this.registerDeepLinkCallback();
54+
this.registerUnifiedDeepLinkCallback();
55+
5456
this.hasRegisteredDeepLinkCallback = true;
5557
}
5658
if (!this.hasInitialized) {
@@ -110,4 +112,20 @@ export class AppsflyerPlugin extends DestinationPlugin {
110112
}
111113
});
112114
};
115+
116+
registerUnifiedDeepLinkCallback = () => {
117+
appsFlyer.onDeepLink((res) => {
118+
if (res.deepLinkStatus !== 'NOT_FOUND') {
119+
const { DLValue, media_source, campaign } = res.data;
120+
const properties = {
121+
deepLink: DLValue,
122+
campaign: {
123+
name: campaign,
124+
source: media_source,
125+
},
126+
};
127+
this.analytics?.track('Deep Link Opened', properties);
128+
}
129+
});
130+
};
113131
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10521,10 +10521,10 @@ react-native-appboy-sdk@^1.32.0:
1052110521
resolved "https://registry.yarnpkg.com/react-native-appboy-sdk/-/react-native-appboy-sdk-1.36.0.tgz#fdda158ba8e6fb87dda7ab8c89510686fe13c02c"
1052210522
integrity sha512-ZveH33LRxJNVEc5ym/tYVpKEEeQwMShV/5Afdum5NZjeTi2Mh/ghTVlCp3t+Icb1BWDnMjke3myiqISYyFXMFw==
1052310523

10524-
react-native-appsflyer@^6.3.50:
10525-
version "6.6.1"
10526-
resolved "https://registry.yarnpkg.com/react-native-appsflyer/-/react-native-appsflyer-6.6.1.tgz#9e0cb55f9a318a7a4f345ed51b18fa0e8f817a10"
10527-
integrity sha512-OPy4ujSlGDpOgrIcVi+Koe967weGIk6Gzx3Z1Fwd0JPp6nu/Tv0Lt6HUPJjMaQUqnC+sdricHikrNixaCo0/dQ==
10524+
react-native-appsflyer@^6.9.4:
10525+
version "6.9.4"
10526+
resolved "https://registry.yarnpkg.com/react-native-appsflyer/-/react-native-appsflyer-6.9.4.tgz#35d8adbee93d169a7af3770739e8fe04de2d2680"
10527+
integrity sha512-GR02uyTjN08oAotVErCqE6nuqKReEskztSCcZhLZ8RbAYAu4Phj6ySvElc6cPF/KxBtR0Q9SE0RLaC1QLBM4mw==
1052810528

1052910529
react-native-branch@^5.6.0:
1053010530
version "5.6.2"

0 commit comments

Comments
 (0)