Deferred deep linking
How deferred deep linking works
Someone taps a link to a sale in your app. They don't have the app, so they install it, open it, and land on your home screen. The sale is gone. Deferred deep linking is how the link survives the install. Here's exactly how I do it, nothing hidden.
The problem
The install gap
A normal deep link (a Universal Link on iOS, an App Link on Android) only works when the app is already installed. If it isn't, the link opens in the browser, the user goes to the store, and the store doesn't pass your link on to the new app.
So something has to remember what the user tapped, and hand it to your app the first time it opens. That's the whole job. That's me.
Step by step
What happens, in order
- The user taps a link on your domain. Any path works, like
go.yourapp.com/sale?code=SAVE20. Nothing to set up first. - App installed? The phone opens it straight to that path. Done, no deferring needed.
- Not installed? The link page notes the click (path, query, time, device type, OS version, locale and IP address) and sends the user to the right store.
- First launch. Your app calls
checkDeferredDeepLink()and gets back the path and query string the user tapped. - You route. Open the screen, apply the code, show the invite. What you do with it is up to you.
import DeepLinkNow from "@deeplinknow/react-native";
await DeepLinkNow.initialize("your-public-api-key");
const link = await DeepLinkNow.checkDeferredDeepLink();
if (link) navigate(link.path, link.queryParams);iOS and Android
How the link gets across
On iOS, the link page's button copies the link to the clipboard as it opens the App Store. On first launch the SDK reads the clipboard, and if it holds a link on your domain, that's the answer. iOS asks the user to “Allow Paste”, so you only check once, on first launch.
On Android, the link page sends the user to Google Play with the click's ID in the install referrer. Play hands that to your app after install, and the SDK looks the click up. This only works for installs from Google Play.
If neither works (the user declined the paste, or installed from another store), the SDK falls back to a scored match.
Scored matches
When there's no exact handoff
The SDK compares the phone that just opened your app with the clicks on your link pages in the last hour, and scores each one out of 100:
- IP address, 40. Same network.
- Device, 30. Same type of device and OS version.
- Time, 20. Full marks within 5 minutes of the click, down to nothing at 60.
- Locale, 10. Same language and time zone.
75 and up is HIGH, 50 and up is MEDIUM, 30 and up is LOW. Anything missing never counts as a match. An IP match isn't required, because iCloud Private Relay hides the real one. You get the score and pick your own threshold. Most vendors call this a black box. It's four numbers.
Privacy
What I keep, and for how long
- A deferred link can be claimed for 1 hour after the click. Click records are deleted within 30 days.
- IP addresses are personal data, and I store them with the click for matching. That's what the 30-day deletion is for.
- No advertising IDs, no ATT prompt, no data shared across apps, and no third-party scripts on the link page.
Limits
What it can't do
- Other devices. Tap on a laptop, install on a phone, and there's nothing to match. The link page shows a QR code on desktop for that reason.
- Late installs. After 1 hour, the click can't be claimed.
- Secrets. A scored match can be wrong. Put a promo code in a link, never a password-reset token.
Ad blockers
Why my links don't get blocked
Ad blockers like AdGuard block the domains of attribution platforms, and that includes their link domains and the scripts on their link pages. When the link page is blocked, the user never gets to the store, and you never get the signup.
My link page runs no tracking scripts and no third-party analytics, and DeepLinkNow isn't on the blocklists. See the comparison.
Questions
- Do I need the IDFA or the ATT prompt for deferred deep linking?
- No. Deferred deep linking gets one user to one screen in your own app. I never read advertising IDs, so there's no ATT prompt and nothing to declare as tracking.
- Does it work with iCloud Private Relay or a VPN?
- Yes. On iOS the clipboard handoff doesn't care about the IP address. For scored matches an IP match isn't required: the device, timing and locale still count, and you choose the threshold.
- How accurate is it?
- The clipboard (iOS) and the Install Referrer (Android) are exact: they carry the link itself, or the ID of the click. A scored match is a best guess, which is why you get the score and decide what to accept.
- Do I have to create links before I can use them?
- No. Any path and query string on your app's domain is a link. Create one in the dashboard only when you want a custom title, image or campaign on it.
- How long does the link wait for the install?
- A deferred link can be claimed for 1 hour after the click, and stored fingerprints are deleted within 30 days. If the user installs the next day, the app opens normally, without the link.
- Does it work with React Native and Expo?
- Yes. The React Native SDK wraps the native iOS and Android SDKs and installs with npx expo install @deeplinknow/react-native.
Try it on your app
Free plan, no credit card. Add the SDK, call checkDeferredDeepLink() on first launch, and any path on your domain works.