Skip to main content
The AppLink module provides functionality to fetch deferred deep links, which are used to attribute app installs to specific campaigns and pass contextual data to newly installed apps.

Import

Deferred deep links allow you to direct users who don’t have your app installed to the App Store or Google Play Store, and then deep link them to specific content after they install and open your app for the first time. Flow:
  1. User clicks ad or link without app installed
  2. User is redirected to App Store/Google Play
  3. User installs app
  4. User opens app for the first time
  5. App fetches deferred deep link
  6. App navigates user to intended content

Methods

Retrieves the deferred app link URL if available.
Returns a Promise that resolves to:
  • A deep link URL string if a deferred link exists
  • null if no deferred link is available
This method should be called once when the app launches for the first time after installation. Subsequent calls will return null.

Usage Examples

Basic Usage

With React Navigation

With Campaign Attribution

First Launch Detection

URL Parsing Example

Important Considerations

Call Only OncefetchDeferredAppLink() should be called only once when the app launches for the first time after installation. Subsequent calls will return null as the deferred link is consumed after the first fetch.
Testing Deferred Deep LinksTesting deferred deep links requires:
  1. Uninstalling the app completely
  2. Clicking a deep link without the app installed
  3. Installing the app from the store
  4. Opening the app and checking for the deferred link
For easier testing during development, use Facebook’s App Ads Helper.
Attribution WindowDeferred deep links have an attribution window (typically 7-28 days). Links clicked outside this window may not be attributed correctly.

URL Scheme Configuration

Ensure your app is configured to handle deep links: iOS (Info.plist):
Android (AndroidManifest.xml):

Best Practices

  1. Call early in the app lifecycle, ideally in your root component’s useEffect
  2. Handle null values gracefully - not all installs have deferred links
  3. Combine with regular deep links for comprehensive deep linking support
  4. Track attribution using AppEventsLogger for campaign performance analysis
  5. Parse URLs carefully and handle malformed URLs gracefully
  6. Test thoroughly using both real campaigns and test tools
  7. Don’t block UI - fetch asynchronously and show loading state if needed

Common Use Cases

  • Campaign attribution - Track which ads drive app installs
  • Referral programs - Direct new users to referrer’s profile
  • Product deep links - Show specific products after install
  • Promotional offers - Apply discount codes from ads
  • Content sharing - Navigate to shared content after install
  • Re-engagement - Return users to specific features