Skip to main content

Deferred Deep Linking

Deferred deep linking allows you to route new users to specific content after they install your app, creating a seamless experience from click to conversion.

What is Deferred Deep Linking?​

Regular deep linking only works for users who already have your app installed.

Deferred deep linking works for new users who don't have your app yet:

  1. User clicks link to product page
  2. User doesn't have app → Sent to App Store/Google Play
  3. User installs app
  4. User opens app for first time
  5. App automatically navigates to the original product page

The "deep link" is deferred until after install.

Why It Matters​

Without Deferred Deep Linking​

User clicks: Instagram ad for wireless headphones

Flow:

  1. Click ad → App Store
  2. Install app
  3. Open app → Generic home screen
  4. User has to search for headphones again
  5. User forgets or gives up

With Deferred Deep Linking​

User clicks: Same Instagram ad

Flow:

  1. Click ad → App Store
  2. Install app
  3. Open app → Automatically shows wireless headphones
  4. User adds to cart immediately

Impact: Fewer users are lost between the click and the purchase.

How It Works​

Create a link with deep link parameters:

curl -X POST https://api.linkforty.com/api/links \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "template_123",
"originalUrl": "https://example.com/products/123?productId=123&category=electronics",
"iosUrl": "https://apps.apple.com/app/id123456789",
"androidUrl": "https://play.google.com/store/apps/details?id=com.yourapp",
"attributionWindowHours": 168
}'

Generated: https://lnk.forty.com/abc123

One link can serve many destinations: append query parameters when you share it and they reach the app after install, so you do not need a separate link per item. See URL Parameter Passthrough.

When user clicks, LinkForty:

  1. Records the click, with an id of its own
  2. Records the device signals for fingerprint matching:
    • IP address
    • User-agent (platform and OS version)
    • Timezone
    • Language
  3. Redirects to the App Store (iOS) or Google Play (Android). On Android, the Google Play URL carries the click's id in its referrer

3. User Installs App​

User downloads and installs from store.

Important: Attribution window starts when user clicks link, not when they install.

4. User Opens App​

On first launch, the SDK reports the install and invokes your deferred deep link handler:

import LinkForty from '@linkforty/mobile-sdk-react-native';

LinkForty.onDeferredDeepLink((deepLinkData) => {
// deepLinkData is the attributed link's data, or null for organic installs
});

5. LinkForty Matches Install​

SDK:

  1. Collects the same device signals, and on Android the Google Play install referrer
  2. Sends them to LinkForty
  3. LinkForty finds the click: the one the install referrer names, or else the best fingerprint match within the link's install window
  4. Returns deep link data if there is a match
// Returns:
{
productId: "123",
category: "electronics",
utm_source: "instagram",
utm_campaign: "spring-sale"
}

6. App Navigates​

Your app uses deep link data to navigate:

if (deepLinkData && deepLinkData.productId) {
navigation.navigate('Product', { id: deepLinkData.productId });
}

User sees the original product page they clicked on!

How an Install Is Matched​

LinkForty matches an install to a click in one of two ways. The install response, and the deferred deep link, say which one in attributionMethod.

Google Play install referrer (Android)​

When LinkForty sends an Android visitor to Google Play, it adds the click's id to the Play URL's referrer parameter. Google Play keeps that referrer with the install and hands it to the app on first launch, through the Play Install Referrer API. The SDK sends it with the install, and LinkForty matches the install to that exact click.

  • attributionMethod is install_referrer, confidenceScore 100, matchedFactors ["install_referrer"], competingLinks 0.
  • It works across networks: the tap on Wi-Fi and the install on cellular still match.
  • The same rules apply as for a fingerprint match: the click must be on one of your workspace's links (with the SDK's app token), the link must still open, the install must arrive within the link's install window, and a single-use link's click goes to one install only. If the named click fails one of these, the install is organic. LinkForty doesn't fall back to a fingerprint guess, because the referrer says which click it was.
  • It needs an install from Google Play, and an SDK release that sends the referrer: Android 1.8.0, React Native 1.9.0, Expo 1.9.0, Flutter 0.6.0.

An install from another store, a sideload, or a device that doesn't answer within 2 seconds is matched by fingerprint.

Fingerprint matching (iOS, and Android without a referrer)​

iOS has no install referrer, so an iOS install is matched by comparing the device with recent clicks, without device IDs (IDFA, GAID), user accounts, cookies or an App Tracking Transparency prompt.

SignalExample
Network (IP address)Same /24 for IPv4, same /64 for IPv6
Platform and OS versioniOS 18
TimezoneAmerica/New_York
Languageen-US

A match needs the same network plus enough of the other signals to score 70 of 100. When more than one click qualifies, the highest score wins, and ties go to the most recent click. attributionMethod is fingerprint, and competingLinks counts the other links that also had a qualifying click from that network: above 0, another person's tap may be the one that led to this install. See Single-use links.

Why Fingerprint Matches Fail​

  1. Network changed: clicked on Wi-Fi, installed on cellular
  2. VPN, proxy or iCloud Private Relay: the IP address changes
  3. Install window passed: installed too long after the click
  4. Different device: clicked on an iPad, installed on an iPhone
  5. Shared or private address: an install from a carrier-shared or private address can't be matched

Getting More Installs Matched​

  • Android: use an SDK release that sends the Play install referrer (see above). Every install from Google Play through a LinkForty link is then matched exactly.
  • Install window: set it to how long your users really take to install. A longer window catches later installs and admits more clicks from the same network; a single-use link should have a short one.
  • App token: set it in the SDK, so matching only considers your workspace's links.

Implementation​

Add deep link parameters to your link URLs:

# Product link
curl -X POST https://api.linkforty.com/api/links \
-H "Authorization: Bearer $LINKFORTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "template_123",
"originalUrl": "https://example.com/products/headphones?productId=456&category=audio",
"iosUrl": "https://apps.apple.com/app/id123",
"androidUrl": "https://play.google.com/store/apps/details?id=com.app"
}'

Deep link parameters: Any query parameter in originalUrl becomes available in app.

Step 2: Integrate SDK​

Install and initialize the SDK:

import LinkForty from '@linkforty/mobile-sdk-react-native';

// Initialize on app launch
LinkForty.init({
baseUrl: 'https://api.linkforty.com',
appToken: 'at_your_app_token', // required on Cloud
});

Setting appToken limits install matching to clicks on your workspace's links, so set it in every app. Find your app token under Settings → App Configuration.

See SDK Integration Guide for full setup.

On first app launch:

import { useEffect } from 'react';
import LinkForty from '@linkforty/mobile-sdk-react-native';
import { useNavigation } from '@react-navigation/native';

function App() {
const navigation = useNavigation();

useEffect(() => {
// Fires on a new install attributed to a link; null for organic installs
LinkForty.onDeferredDeepLink((data) => {
if (data) {
console.log('Deep link data:', data);
handleDeepLink(data);
}
});
}, []);

const handleDeepLink = (data) => {
const params = data.customParameters ?? {};
if (params.productId) {
navigation.navigate('Product', { id: params.productId });
} else if (params.category) {
navigation.navigate('Category', { slug: params.category });
} else if (data.deepLinkPath) {
// Route using the link's deep link path
navigation.navigate(data.deepLinkPath);
}
};

return (
// Your app
);
}

Step 4: Test​

Test flow:

  1. Create test link with query parameters
  2. Copy link to notes app on test device
  3. Uninstall app from device
  4. Click link from notes
  5. Install app from store
  6. Open app
  7. Check if navigated to correct content

Expected logs:

[LinkForty] Checking for deep link...
[LinkForty] Match found!
[LinkForty] Deep link data: {
productId: "456",
category: "audio",
utm_source: "test"
}
[App] Navigating to product 456

URL Parameter Passthrough​

You do not need a separate link for every piece of content. Add query parameters to one link when you share it, and they reach the app after the install.

https://go.example.com/content?slug=titanic
https://go.example.com/content?slug=spiderman-homecoming

Both are the same link. The value you appended arrives in customParameters, whether the app was just installed or was already on the device:

function openContent(data) {
const slug = data?.customParameters?.slug;
if (slug) {
navigation.navigate('Content', { slug });
}
}

// New install, matched back to the click
LinkForty.onDeferredDeepLink(openContent);

// App already installed — the OS hands the link straight to the app
LinkForty.onDeepLink((url, data) => openContent(data));

The two entry points are different moments, but the value is read the same way in both. You do not need to parse the URL yourself.

On a direct open the SDK merges the parameters from the tapped URL into the payload it resolves for the link. If a name appears in both, the URL wins — see Precedence.

SDK Versions​

Delivering URL parameters on a direct open requires:

SDKMinimum version
React Native1.6.1
Expo1.6.1
iOS1.4.1
Android1.3.2
Flutter0.2.2

Earlier versions still receive parameters on the deferred path. On a direct open they fall back to the link's stored configuration, so customParameters will not carry what was appended to the URL.

The Android and Flutter floors are one patch above the release that added passthrough. Android 1.3.1 and Flutter 0.2.1 carry a separate defect that fails SDK initialization on an organic (unattributed) install; 1.3.2 and 0.2.2 fix it.

Reserved Parameters​

Some names are consumed by LinkForty and never reach your app, because they already do a job. Matching is case-insensitive, and the first two are matched by prefix — every name starting with utm_ or fp_ is reserved, not just the ones listed here:

NameUsed for
utm_* — e.g. utm_source, utm_medium, utm_campaign, utm_term, utm_contentcampaign reporting — see Campaigns
fp_* — e.g. fp_tz, fp_lang, fp_sw, fp_sh, fp_platform, fp_pvthe device fingerprint used to match the install
lf_click (exact)the click id LinkForty adds to your destination URL

Anything else is passed through. Avoid the utm_ and fp_ prefixes for your own values.

Limits​

  • 16 parameters per link. Beyond that, the extras are dropped.
  • 256 characters per value. Longer values are silently truncated, not rejected — the link still works and the click is still recorded, so check the length yourself if a value might be long.

Precedence​

A parameter on the URL beats one configured on the link itself. A link set up with slug=default that is shared as ?slug=titanic delivers titanic — what the sharer put on the URL is more specific than the link's stored configuration.

What Does Not Come Through​

  • Bot traffic. Clicks classified as bots record no parameters at all.
  • Values added after the click. Parameters are captured at click time. Changing the URL later does not change what an earlier click stored.
  • The fragment. Anything after # never reaches the server.
Validate before you route

These values come from a public URL and anyone can set them to anything. Treat them as untrusted input: check that a value is one you expect before routing on it, and never pass one straight into a URL loader, a database query, or a privileged navigation.

Use Cases​

Link: Instagram ad for wireless headphones

{
"originalUrl": "https://shop.example.com/products/wireless-headphones?productId=789",
"iosUrl": "https://apps.apple.com/app/id123",
"androidUrl": "https://play.google.com/store/apps/details?id=com.shop"
}

App flow:

const data = await LinkForty.getInstallData();
// data.customParameters: { productId: "789" }

navigation.navigate('Product', { id: data?.customParameters?.productId });

User sees: Wireless headphones product page immediately after install.

Link: Email with article link

{
"originalUrl": "https://blog.example.com/articles/how-to-cook-pasta?articleId=123&section=recipes",
"iosUrl": "https://apps.apple.com/app/id456",
"androidUrl": "https://play.google.com/store/apps/details?id=com.blog"
}

App flow:

const data = await LinkForty.getInstallData();
// data.customParameters: { articleId: "123", section: "recipes" }

navigation.navigate('Article', { id: data?.customParameters?.articleId });

User sees: Article about cooking pasta.

Referral Programs​

Link: Friend's referral link

{
"originalUrl": "https://example.com/referral/john-doe?referrerId=user_456&reward=10",
"iosUrl": "https://apps.apple.com/app/id789",
"androidUrl": "https://play.google.com/store/apps/details?id=com.app"
}

App flow:

const data = await LinkForty.getInstallData();
const params = data?.customParameters ?? {};
// { referrerId: "user_456", reward: "10" }

// Award referral credit
await awardReferralCredit(params.referrerId, params.reward);

// Show success message
showToast(`You received $${params.reward} credit from ${getReferrerName(params.referrerId)}!`);

User sees: Welcome message with referral credit.

Promotional Campaigns​

Link: Limited-time offer

{
"originalUrl": "https://example.com/promo/spring-sale?couponCode=SPRING20&discount=20",
"iosUrl": "https://apps.apple.com/app/id123",
"androidUrl": "https://play.google.com/store/apps/details?id=com.app"
}

App flow:

const data = await LinkForty.getInstallData();
const params = data?.customParameters ?? {};
// { couponCode: "SPRING20", discount: "20" }

// Auto-apply coupon
await applyCoupon(params.couponCode);

// Navigate to sale
navigation.navigate('Sale', { discount: params.discount });

User sees: Sale page with coupon already applied.

Advanced Techniques​

Multi-Step Onboarding​

Defer deep link until after onboarding:

const [onboardingComplete, setOnboardingComplete] = useState(false);
const [pendingDeepLink, setPendingDeepLink] = useState(null);

useEffect(() => {
checkDeepLink();
}, []);

const checkDeepLink = async () => {
const data = await LinkForty.getInstallData();
if (data) {
setPendingDeepLink(data);
}
};

const handleOnboardingComplete = () => {
setOnboardingComplete(true);

if (pendingDeepLink) {
handleDeepLink(pendingDeepLink);
}
};

Conditional Navigation​

Navigate based on user state:

const handleDeepLink = async (data) => {
const user = await getCurrentUser();

if (!user) {
// Not logged in - show login, then navigate
navigation.navigate('Login', {
redirectTo: 'Product',
redirectParams: { id: data.productId }
});
} else {
// Logged in - navigate directly
navigation.navigate('Product', { id: data.productId });
}
};

Handle missing or invalid data:

const handleDeepLink = async (data) => {
if (data.productId) {
// Validate product exists
const product = await api.getProduct(data.productId);

if (product) {
navigation.navigate('Product', { id: data.productId });
} else {
// Invalid product - fallback to category
if (data.category) {
navigation.navigate('Category', { slug: data.category });
} else {
// No valid destination - go to home
navigation.navigate('Home');
}
}
}
};

Track deep link usage:

const handleDeepLink = async (data) => {
// Track deep link event
await LinkForty.trackEvent('deep_link_opened', {
productId: data.customParameters?.productId,
utm_source: data.utmParameters?.source,
utm_campaign: data.utmParameters?.campaign,
hasAccount: !!user,
});

// Navigate
navigation.navigate('Product', { id: data.customParameters?.productId });
};

Troubleshooting​

Symptom: the deferred deep link handler fires with null (or getInstallData() returns null) despite the user clicking the link.

Debug steps:

  1. Check attribution window:

    # View link details
    curl https://api.linkforty.com/api/links/abc123 \
    -H "Authorization: Bearer $LINKFORTY_API_KEY"

    # Check attribution_window_hours value
  2. Enable debug logging:

    LinkForty.init({
    baseUrl: 'https://api.linkforty.com',
    appToken: 'at_your_app_token',
    debug: true,
    });
  3. Check click was recorded:

    • Go to Analytics → Links → Select link
    • Verify click appears in list
    • Note timestamp
  4. Check install timing:

    • Compare click timestamp to install time
    • If >attribution window → No match expected
  5. Verify network conditions:

    • Same WiFi/cellular for click and install?
    • VPN enabled?
    • iOS Private Relay active?

Few Installs Matched​

  1. Android: check the install referrer. With an SDK release that sends it (Android 1.8.0, React Native 1.9.0, Expo 1.9.0, Flutter 0.6.0), an install from Google Play through a LinkForty link has attributionMethod install_referrer. If you see fingerprint or none instead, check that the app was installed from Google Play, and that the link sent the visitor to Google Play rather than to a web page.

  2. Check the install window:

    • An install after the window has no match
    • Set the window to how long your users take to install
  3. Check where the link was opened:

    • A tap in one app and an install on another device can't be matched
    • On iOS, a VPN or iCloud Private Relay changes the network

Incorrect Content Loaded​

Symptom: Deep link data has wrong product ID.

Possible causes:

  1. False positive match:

    • User clicked different link before
    • Fingerprints happened to match
    • Solution: Shorter attribution window
  2. Query parameter typo:

    • Check link URL has correct parameters
    • Verify parameter names match app code
  3. Cached data:

    • Old deep link data cached
    • Solution: Clear app data and retest

Best Practices​

Include useful data in every link:

Good:

originalUrl: "https://example.com/product?productId=123&category=electronics"

Bad:

originalUrl: "https://example.com/product"

2. Use Meaningful Parameter Names​

Be explicit:

Good:

?productId=123&categorySlug=electronics

Bad:

?id=123&cat=elec

3. Handle Missing Parameters​

Always provide fallbacks:

const data = await LinkForty.getInstallData();

const params = data?.customParameters ?? {};

if (params.productId) {
navigation.navigate('Product', { id: params.productId });
} else if (params.category) {
navigation.navigate('Category', { slug: params.category });
} else {
navigation.navigate('Home');
}

4. Test on Real Devices​

Fingerprint matching doesn't work in simulators. Always test on physical devices.

5. Set Appropriate Attribution Windows​

Match window to expected user behavior:

  • Impulse products: 1-3 days
  • Considered purchases: 7-14 days
  • Referrals: 30-90 days

Monitor conversion rates:

// Track when deep link opens
await LinkForty.trackEvent('deep_link_opened', {
productId: data.customParameters?.productId,
});

// Track if user converts
await LinkForty.trackRevenue(29.99, 'USD', {
productId: data.customParameters?.productId,
});

View in dashboard: See conversion rate from deep link open → purchase.

Next Steps​

Further Reading​