Deferred deep links solve a common problem: when a user clicks a link but doesn't have your app installed yet. Smler stores the link data server-side, and after the user installs your app, you can retrieve that original link to navigate them to the correct content.
Flutter Package
Smler has published a package on flutter which can be used to handle deferred deep linking in flutter.
We have also published an example package with deferred and deep linking configured. You can use that as a reference to configure deep linking in your application.
Alternatively, we also have the flutter package as open source under MIT License. You can copy it and modify based on your needs and use it in your apps. Giving you complete flexibility
If you also wish to track the user clicks and mark a successful download as convertion. You can go through docs of tracking a deferred deep links to know in detail of how tracking works.
Detailed Youtube video
You can see the detailed youtube video by visiting this link
Overview of how Deferred links SDK works
Android's Install Referrer API
The Android Install Referrer API allows an app to securely retrieve information that was attached to the Play Store install link at the time of installation.
What It Does
When a user installs an app from Google Play, the API provides:
Referrer parameters (e.g. campaign data, deep link payload)
Install timestamps
Click timestamps
This data is available only on the first app launch after installation.
How It Works (High Level)
User clicks a Play Store URL with a
referrerparameter.Google Play stores the referrer data during install.
On first launch, the app calls the Install Referrer API.
Google Play returns the original referrer payload.
The app uses this data for deferred deep linking or attribution.
Code needed for smler to track the link conversion core code
if (Platform.isAndroid) {
/**
* Needed for tracking for android
* <uses-permission android:name="android.permission.INTERNET" />
* final info = await SmlerDeferredLink.getInstallReferrerAndroid();
* if(info.getParam('clickId').isNotEmpty) {
* final apiRes = await info.trackClick();
* Take any action based on apiRes if needed. This is optional.
* }
*/
final info = await SmlerDeferredLink.getInstallReferrerAndroid();
final clickId = info.getParam('clickId');
if(clickId.isNotEmpty) {
final apiRes = await info.trackClick();
}
status = "Android Referrer Loaded";
}iOS Clipboard Technique
Unlike Android, iOS does not provide an Install Referrer–style API to retrieve data passed at install time. As a result, deferred deep linking on iOS relies on alternative mechanisms, one of which is temporary clipboard-based attribution.
How It Works (High Level)
User clicks a deep link containing encoded metadata.
Before redirecting to the App Store, the landing page writes a short-lived token or payload to the system clipboard.
The user installs and opens the app.
On first launch, the app reads the clipboard contents.
If a valid payload is found, the app resolves it via backend and routes the user accordingly.
Why Clipboard Is Used
iOS blocks access to install-time parameters
Clipboard survives the App Store transition
Works without private APIs or device identifiers
Code needed for smler to track and make it work
if (Platform.isIOS) {
/**
* On IOS, deep links details are copied to clipboard by the OS
* When the app is opened for the first time after installation.
* We would extract the deep link from clipboard.
* Make sure you pass domain in deepLinks array
*
*/
final res = await SmlerDeferredLink.getInstallReferrerIos(
deepLinks: ["go.singh3y.dev"],
);
if (res != null) {
params = res.queryParameters;
final clickId = res.getParam('clickId');
print('iOS Deep Link Params: $params and Click Id: $clickId');
status = "iOS Clipboard Deep Link Loaded";
if (clickId!.isNotEmpty) {
await res.trackClick();
}
} else {
print('No deep link found');
status = "No deep link found";
}
}
You can see the entire working flutter repo by visiting this github repo.
Sample Deferred Link Github Repo
https://github.com/smler-app/smler_deferred_app this repo has a sample flutter application with deferred links configured. The video walkthrough for this repo is mentioned above.
Further reading resources
Conversion Tracking deferred deep links
Published with LeafPad