Installation
- Bundle
- CDN
Deferred deep linking works even if the user installed the app days after clicking the link. AppsFlyer stores the click data and delivers it on first launch.
How it works
Despia handles navigation automatically. When a deep link is resolved, the native layer navigates the WebView to the correct path directly. Your web app just renders whatever page it lands on, the same way it handles any other URL.
Create a OneLink URL
In your AppsFlyer dashboard, go to Engage > OneLink Management and create a campaign link with
deep_link_value and any custom params like page_id or creator_code.Use the link in your ads or share with creators
Paste the generated OneLink URL into your TikTok or Meta ad creative, or give it to a content creator as their affiliate link.
Required: Map deep_link_value to a Real Route
This is the most important setup step.deep_link_value is not magic. It is a plain string that Despia appends to your app’s base URL to build a path. If that path does not exist as a real route in your web app, the user will land on a blank page or 404.
How the mapping works:
/product that reads page_id and creator_code from the query string and loads the correct content.
Step 1: Decide your deep link routes
Before creating any OneLink URLs, decide which pages you want to support as deep link destinations. Keep values short and URL-safe.
| deep_link_value | Route in your app | Use case |
|---|---|---|
product | /product | Land on a specific product page |
collection | /collection | Land on a curated collection |
profile | /profile | Land on a creator or user profile |
offer | /offer | Land on a special offer or promo page |
onboarding | /onboarding | Start a custom onboarding flow |
home | / | Default home screen |
deep_link_value must have a corresponding route in your client-side router. Here is how to handle the query params:
- React Router
- Vue Router
- Plain JS
deep_link_value in your OneLink campaign URL.
Read Deep Link Parameters
Even though Despia navigates automatically, the full deep link data is also available indespia.appsFlyerAttribution on every page load. Use this to personalize content based on the campaign or creator params.
The main routing value. Despia navigates the WebView to this path automatically, e.g.
"product", "collection", "offer"A specific content ID to load on the destination page, e.g. a product ID, collection ID, or profile ID
General-purpose sub-parameter. Commonly used for creator or affiliate codes.
General-purpose sub-parameter for additional routing context
Personalize the Page on Load
Creator and Affiliate Links
Deep linking works great for content creator and influencer affiliate campaigns. Each creator gets their own OneLink URL with their unique code. When a user installs via a creator link, you know exactly which creator drove the install and can attribute credit, apply discounts, or personalize the welcome experience. Example creator link:Re-engagements: window.onAppsFlyerDeepLink
For re-engagements, when a user who already has the app installed taps a campaign or creator link while the app is open, Despia callswindow.onAppsFlyerDeepLink with the full click event data. Define this function to handle routing when the app is already running.
OneLink URL Structure
The main routing destination. Despia uses this to navigate the WebView to the correct path automatically.
A specific content ID to load on the destination page
General-purpose sub-parameter. Commonly used for creator codes, affiliate IDs, or promo codes.
General-purpose sub-parameter for additional context
Media source identifier, e.g.
"tiktokads_int", "facebook", "influencer_int". Set in the AppsFlyer dashboard.Campaign name for attribution and reporting
Despia Dashboard Setup
All deep linking configuration is handled directly in the Despia dashboard. No code changes, no native setup required.Add your OneLink URLs
Enter your OneLink subdomain and any OneLink URLs you want the app to handle as deep links
Add your ad platform IDs
Enter your Facebook App ID, TikTok App ID, AdMob App ID, and any other ad platform credentials in the same screen
Despia configures Universal Links automatically based on the OneLink URLs you enter in the dashboard. No entitlements files, no native developer involvement required.
Despia also registers the
appsflyer:// URI scheme automatically. This is an AppsFlyer SDK requirement for URI scheme deep linking fallback — it allows deep links to open the app when Universal Links are unavailable, for example in some in-app browsers or older iOS versions. This is separate from Despia’s internal web bridge commands and requires no configuration on your part.Frequently Asked Questions
Does Despia navigate the WebView automatically?
Does Despia navigate the WebView automatically?
What is window.onAppsFlyerDeepLink for?
What is window.onAppsFlyerDeepLink for?
This is for re-engagements only, when a user who already has the app installed taps a campaign or creator link while the app is open. In this case the page has already loaded so there is no new page load. Despia calls
window.onAppsFlyerDeepLink(data) with the click event data so your app can respond to the new link without a full page reload.Does deferred deep linking work if the user installs days later?
Does deferred deep linking work if the user installs days later?
Yes. AppsFlyer stores the click data server-side with a configurable lookback window (default 7 days). When the user installs and opens the app within that window, the deep link parameters are delivered on first launch and Despia navigates automatically.
What if deep_link_value is null?
What if deep_link_value is null?
The user did not come from a deep link campaign. Despia will not navigate anywhere and the app opens to its default page normally.
How do I track which creator drove the most installs?
How do I track which creator drove the most installs?
Give each creator a unique OneLink URL with their code in
deep_link_sub1. In your AppsFlyer dashboard, filter raw data by af_sub1 to see installs, events, and revenue per creator. You can also fire a custom creator_referral event on first launch to track conversions per creator in your own backend.Can I pass custom parameters beyond deep_link_value?
Can I pass custom parameters beyond deep_link_value?
Yes. Add any query parameter to your OneLink URL and it will be available in
despia.appsFlyerAttribution. Use deep_link_sub1 through deep_link_sub5 for standard affiliate and creator params. For fully custom parameters, access them via attr.raw.Resources
NPM Package
Install the Despia SDK
AppsFlyer OneLink Docs
Create and manage OneLink campaign URLs
Support
Contact our support team