1、Wiki定義:
Deferred deep linking is one aspect of mobile deep linking. It describes the principle of deep linking into an app that is not yet installed. In this case, deep linking will be "deferred" until the application will be installed by the user. This implies that clicking (or otherwise invoking) the deep link causes:
- An app store to open (Google Play/IOS or Windows App Store depending on the user's device) to enable the user to install the app
- Once the app is installed, the link is invoked with its original URL and parameters so that the newly installed app can handle the invocation.
A common use case is to drive installs; linking to functionality in a not-yet-installed app provides the user with an incentive to install it.
Deferred deep linking allows mobile developers and mobile marketers to deliver a seamlessly and automated user experience, whether the app was previously installed or not, improving conversion rates and user retention.
延遲深度鏈接是[移動(dòng)深層鏈接]的一個(gè)方面。它描述了深度鏈接到尚未安裝的應(yīng)用程序的原理。在這種情況下,深度鏈接將“延遲”,直到用戶(hù)安裝應(yīng)用程序。這意味著單擊(或以其他方式調(diào)用)深層鏈接會(huì)導(dǎo)致:
1.要打開(kāi)的應(yīng)用商店(Google Play / IOS或Windows App Store,具體取決于用戶(hù)的設(shè)備),以便用戶(hù)安裝應(yīng)用
2.安裝應(yīng)用程序后,將使用其原始URL和參數(shù)調(diào)用鏈接,以便新安裝的應(yīng)用程序可以處理調(diào)用。
一個(gè)常見(jiàn)的用例是驅(qū)動(dòng)安裝;鏈接到尚未安裝的應(yīng)用程序中的功能為用戶(hù)提供了安裝它的動(dòng)力。
延遲深度鏈接允許移動(dòng)開(kāi)發(fā)人員和移動(dòng)營(yíng)銷(xiāo)人員提供無(wú)縫和自動(dòng)化的用戶(hù)體驗(yàn),無(wú)論該應(yīng)用程序之前是否已安裝,都可提高轉(zhuǎn)換率和用戶(hù)保留率。
2、通過(guò)AppsFlyer實(shí)現(xiàn)Deferred-Deep-Linking:
OneLink? 深度鏈接指南 - OneLink Deep Linking Guide
延遲深度鏈接 - 獲取轉(zhuǎn)化數(shù)據(jù) - Deferred-Deep-Linking-Getting-the-Conversion-Data
文檔寫(xiě)的很好,有一些英文的部分,但是閱讀難度不大,圖文并茂!
3、回調(diào)方法:
-(void)onConversionDataReceived:(NSDictionary*) installData {
//Handle Conversion Data (Deferred Deep Link)
NSNumber* firstLaunch = [installData objectForKey:@"is_first_launch"];
if (firstLaunch.boolValue) {
NSString *url = [installData objectForKey:@"af_dp"];
NSString *realUrl = [url adjUrlDecode];
NSURL *djUrl = [NSURL URLWithString:realUrl];
if (djUrl != nil) {
[AppCall handleOpenURL: djUrl sourceApplication:nil];
}
}
}
-(void)onConversionDataRequestFailure:(NSError *) error {
NSLog(@"%@",error);
}
- (void) onAppOpenAttribution:(NSDictionary*) attributionData {
//Handle Deep Link
NSString *link = [attributionData objectForKey:@"link"];
NSURL *linkUrl = [NSURL URLWithString:link];
NSDictionary *dict = [DJAppCall dictionaryWithQuery: linkUrl.query];
NSString *url = [dict objectForKey:@"af_dp"];
NSString *realUrl = [url adjUrlDecode];
NSURL *djUrl = [NSURL URLWithString:realUrl];
if (djUrl != nil) {
[AppCall handleOpenURL: djUrl sourceApplication:nil];
}
}
- (void) onAppOpenAttributionFailure:(NSError *)error {
NSLog(@"%@",error);
}
4、 值得注意的一些地方:
- 注意URL的轉(zhuǎn)義
- 測(cè)試注意:雖然點(diǎn)擊OneLink會(huì)跳轉(zhuǎn)到AppStore,但是你還是可以用開(kāi)發(fā)環(huán)境的證書(shū)打包代替從AppStore下載,幾個(gè)回調(diào)方法還是能正常回調(diào)。
- 這個(gè)功能還是存在一定隨機(jī)性會(huì)失敗,多嘗試幾次也未嘗不可。
- -(void)onConversionDataReceived:(NSDictionary*) installData {} : 這個(gè)方法在每次有后臺(tái)喚醒都會(huì)調(diào)用,所以注意 "is_first_launch" 的值來(lái)判斷是否是第一次安裝很重要。