SDKsReact Native
Deferred Deep Links
Preserve link context through App Store and Play Store installs.
Deferred deep links let you route users to specific content even when they don't have your app installed. The user clicks a link, installs from the App Store or Play Store, and on first launch the SDK matches them back to the original link.
How It Works
- User taps a WarpLink URL in a browser
- WarpLink captures browser signals via a JavaScript interstitial
- User is redirected to the App Store (iOS) or Play Store (Android)
- User installs and opens the app
- SDK detects first launch (UserDefaults on iOS, SharedPreferences on Android)
- SDK collects device signals and sends them to the attribution API
- Server matches against stored click data
- Deep link returned with
isDeferred: true
Check for Deferred Deep Links
import { useEffect, useState } from 'react';
import { WarpLink, type WarpLinkDeepLink } from '@warplink/react-native';
function App() {
const [isReady, setIsReady] = useState(false);
useEffect(() => {
WarpLink.checkDeferredDeepLink()
.then((link) => {
if (link?.isDeferred) {
navigateTo(link.deepLinkUrl ?? link.destination);
}
})
.catch((error) => {
console.warn('Deferred deep link check failed:', error.message);
})
.finally(() => {
setIsReady(true);
});
}, []);
if (!isReady) return <SplashScreen />;
return <>{/* Your app */}</>;
}Confidence-Based Routing
const link = await WarpLink.checkDeferredDeepLink();
if (!link?.isDeferred) return;
const confidence = link.matchConfidence ?? 0;
if (confidence > 0.5) {
// High confidence — navigate directly
const productId = link.customParams['product_id'] as string | undefined;
if (productId) {
navigation.navigate('Product', { id: productId });
} else {
navigation.navigate('WebView', { url: link.destination });
}
} else if (confidence > 0.3) {
// Medium confidence — show suggestion
navigation.navigate('Suggestion', {
message: 'Were you looking for this?',
url: link.destination,
});
}
// Below 0.3 — ignore, show default onboardingConfidence Scores
| Scenario | Confidence | Match Type |
|---|---|---|
| IDFV re-engagement (iOS) | 1.0 | deterministic |
| Play Install Referrer (Android) | 1.0 | deterministic |
| Enriched fingerprint, < 1 hour | 0.85 | probabilistic |
| Enriched fingerprint, < 24 hours | 0.65 | probabilistic |
| Enriched fingerprint, < 72 hours | 0.40 | probabilistic |
| Multiple candidates | -0.15 per extra | probabilistic |
Match Window
WarpLink.configure({
apiKey: 'wl_live_abcdefghijklmnopqrstuvwxyz012345',
matchWindowHours: 48,
});Platform Differences
| iOS | Android | |
|---|---|---|
| Deterministic match | IDFV (re-engagement) | Play Install Referrer |
| First launch tracking | UserDefaults | SharedPreferences |
| ATT required? | No (IDFV is exempt) | N/A |
Caching Behavior
- Attribution check happens once per install (first launch only)
- Result cached by the native SDK
- Subsequent calls to
checkDeferredDeepLink()returnnull
Edge Cases
Offline First Launch
checkDeferredDeepLink() rejects with E_NETWORK_ERROR. The first-launch flag may be consumed, so retrying later may return null.
Check for connectivity before calling checkDeferredDeepLink() if your first-launch experience depends on it.
App Reinstall
- iOS: UserDefaults may persist across reinstalls (iCloud backup). SDK may return cached result.
- Android: SharedPreferences cleared on uninstall. Fresh install triggers new attribution.
Multiple Links Before Install
Only the most recent click is matched.