avatarOnexlab

Summary

The website provides a guide on implementing and testing deferred deep linking with AppsFlyer for mobile applications on iOS and Android platforms.

Abstract

The article details the process of setting up deferred deep linking using AppsFlyer's SDK, which enables an app to open a specific page or content when launched for the first time after installation, even if the app was not installed when the original link was clicked. It explains the concept of deep linking, the challenges when the app is not installed, and how deferred deep linking addresses these issues by redirecting users to the App Store or Play Store first. The guide includes code examples for Android and iOS, the handling of conversion data, and practical steps for testing deferred deep links to ensure proper functionality.

Opinions

  • The article suggests that using AppsFlyer's SDK is an effective way to implement deferred deep linking.
  • It emphasizes the importance of handling the af_dp attribute for successful deep linking.
  • The guide highlights the necessity of testing deferred deep links on physical devices to ensure they work as expected.
  • It recommends using specific AppsFlyer tools and references to assist developers in the implementation process.
  • The article implies that proper handling of deep linking is crucial for a seamless user experience, especially in marketing campaigns that use links in emails, SMS, or ads.

How to test Deferred Deep Linking with AppsFlyer

AppsFlyer Deep Link Best Practise iOS, Android, Web

Deferred Deep Link Best Practise iOS, Android, Web

What is Deep Link?

Let say you have Education app that shows you the different type of courses in the app. For instance “Learn PHP”, “Learn Java” etc.

If you want to do marketing to share the above courses by Email, SMS or Google Ads, etc. Whenever use taps the link from the Email, SMS or Google Ads. It should open the app and should display the tapped item in the app.

Note: App should be installed for the above scenario

Deep Link Sample: nameoftheapp://open?View=Course&ID=4565

Simple Deeplink Example

Above Deep Link, the sample will display item based on ID=4565

What is Deferred Deep Link?

Taking the above example again let say you tapped on the Deep Link in the SMS but the app is not installed on your phone then the above deep link will not work. To solve this problem we use Deferred Deep Link.

With Deferred Deep Link if the app is not installed on your phone then it will redirect the user to App Store or Play Store. To solve this issue we used AppsFlyer SDK to create Deferred deep link

Deferred Deep Link Example: https://yourapp.onelink.me/2892277155/DefDeepLink

Following Screenshots, we have added Deep Link URL as well redirect URL of both iOS App Store and Android Play Store

If you are developing for Android then you need to add the following code to your Application file. Appsflyer Reference

If you are developing for iOS then you need to add the following code to your AppDelegate file. Appsflyer Reference

To handle Deferred Deep Link you need to use Conversion data as shown following the JSON sample. You need to handle af_dp attributes to handle Deeplink. If the user is coming from Play Store then you need to use onConversionDataSuccess which will return you attribute af_dp else you need to use onAppOpenAttribution which will also return you attribute af_dp

Reference: 
https://support.appsflyer.com/hc/en-us/articles/207032096-Deferred-deep-linking-getting-the-conversion-data#examples{
  "media_source":"network_int",
  "af_dp":"nameoftheapp://open?View=Course&ID=4565",
  "adset_id":null,
  "click_time":"2017-07-18 14:48:42.896",
  "cost_cents_USD":"0",
  "iscache":true,
  "is_first_launch":1,
  "install_time":"2017-07-18 15:09:06.014",
  "af_sub2":"network_KR_G001_iOS",
  "clickID":"3gggBgAw2Bvxa8gR56ZA8Y3qjUy2gPkFgP6rA96s4e*******",
  "freehand-param":"somevalue"
}

How to test Deferred Deep Link

Step 1: Delete the app from the physical device.

Step 2: Click on to the Deep Link

Step 3: It will redirect to AppStore or Play Store. Don’t download from there

Step 4: Try to run app from Android Studio/Xcode

Step 5: Check if you are getting "af_dp" the attribute should not be null

if you are getting "af_dp" null then try to add new test device to Appslfyer Console

Download the following app it will return your device IDFA no. for iOS and AID (Android Id) for Android

iOS: https://apps.apple.com/us/app/my-device-id-by-appsflyer/id1192323960

Android: https://play.google.com/store/apps/details?id=com.appsflyer.android.deviceid&hl=en

Deferred Deep Link
Appsflyer
Deeplink
iOS
Android
Recommended from ReadMedium