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 callback.
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 iOS platform settings in the Adjust dashboard, before passing it to the Adjust SDK.
Setup
Set up a deferred deep link callback
Conform to the AdjustDelegate protocol in your AppDelegate. If you have already configured attribution callbacks, you can skip this step.
// (for example, store it or handle it immediately)
8
9
returnNO; // or YES based on your use case (see below)
10
}
Return Value Options
The return value of adjustDeferredDeeplinkReceived determines what happens after your callback 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 callback 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 callback code runs, and then the Adjust SDK calls application(_:open:options:) with the deferred deep link, which iOS then routes to the appropriate handler based on your app setup:
App Implementation
Handler
UIKit using AppDelegate
application(_:open:options:)
UIKit using SceneDelegate
scene(_:openURLContexts:)
SwiftUI
.onOpenURL modifier
To handle the deep link from the appropriate handler above, ensure that you have already implemented direct deep linking.
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 callback 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.
AppDelegate
Deferred deep linking updates to AppDelegate are in the highlighted code. This example is applicable to both the UIKit and SwiftUI examples.