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
What are Deferred Deep Links?
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:- User clicks ad or link without app installed
- User is redirected to App Store/Google Play
- User installs app
- User opens app for the first time
- App fetches deferred deep link
- App navigates user to intended content
Methods
fetchDeferredAppLink
Retrieves the deferred app link URL if available.- A deep link URL string if a deferred link exists
nullif 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
Advanced: Combining Regular and Deferred Deep Links
URL Parsing Example
Important Considerations
Testing Deferred Deep LinksTesting deferred deep links requires:
- Uninstalling the app completely
- Clicking a deep link without the app installed
- Installing the app from the store
- Opening the app and checking for the deferred link
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):Best Practices
- Call early in the app lifecycle, ideally in your root component’s
useEffect - Handle null values gracefully - not all installs have deferred links
- Combine with regular deep links for comprehensive deep linking support
- Track attribution using AppEventsLogger for campaign performance analysis
- Parse URLs carefully and handle malformed URLs gracefully
- Test thoroughly using both real campaigns and test tools
- 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
Related
- AppEventsLogger - Track deep link attribution events
- Facebook App Links - App Links documentation
- React Native Linking - Handle regular deep links
- Branch.io - Alternative deep linking solution