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
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
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