Deferred deep linking allows users who don’t have your app installed to click an Adjust link, install your app from the app store, and then be directed to their intended content when they first open the app.
How it works
This is the basic flow of deferred deep linking:
The user clicks on an Adjust deep link.
Adjust’s servers redirect the user to the app store.
The user installs or reinstalls your app and opens it.
The Adjust SDK sends a /session request and an /attribution request to Adjust’s servers.
Adjust’s servers match the click to the install or reinstall and return the deferred deep link to the SDK in one of the following responses:
The Adjust SDK delivers the deferred deep link to your app via the deferred deep link listener.
If applicable, your app displays its initial screens, such as onboarding screens and user login.
Your app handles the deep link and navigates to the appropriate screen.
Deferred deep link format
When a user clicks an Adjust branded link (brandname.go.link) and the link is deferred, Adjust’s servers convert it to app scheme format (example://), using the app scheme configured in the Android platform settings in the Adjust dashboard, before passing it to the Adjust SDK.
Setup
Set up a deferred deep link listener
Create an AdjustConfig object.
Set a deferred deep link listener on the AdjustConfig object. The Adjust SDK calls this listener after receiving a deferred deep link.
* (for example, store it or handle it immediately)
15
*/
16
17
returnfalse; // or true based on your use case (see below)
18
}
19
});
20
21
Adjust.initSdk(config);
Return Value Options
The return value of the deferred deep link listener determines what happens after your listener code executes:
Return false (most common)
Use this approach if you want your app to have complete control over when and how to process the deferred deep link. By returning false, the Adjust SDK will not attempt to open the deferred deep link. For example, this approach is appropriate if your app needs to show and move past initial screens (like onboarding or login) before handling the deferred deep link.
Return true
Use this approach if you want the Adjust SDK to attempt to open the deferred deep link immediately after the listener code runs. For example, this approach is appropriate if your app does not have any initial screens.
When the Adjust SDK receives the deferred deep link, your listener code runs, and then the Adjust SDK calls startActivity(Intent) with the deferred deep link.
Full code example
This example shows how an app with an onboarding process handles deferred deep links.
Here is a summary of the app’s internal flow:
The user opens the app, and deferred deep linking is applicable.
The app begins its onboarding process.
The app’s listener receives the deferred deep link from the Adjust SDK and then checks if onboarding is complete:
If complete, it handles the deep link immediately.
If not complete, it stores the deep link.
Once onboarding finishes, the app checks for and handles any stored deferred deep link.
The app navigates the user to the deep link screen.