Installation
- Bundle
- CDN
Connect Partners in AppsFlyer
For install attribution and event postbacks to flow to Meta and TikTok you need to connect them as integrated partners.1
Open Integrated Partners
In your AppsFlyer dashboard, go to Configuration > Integrated Partners.
2
Connect Meta
Find Meta ads, click Edit, enable the integration, and enter your Meta App ID.
3
Map conversion events
Under In-App Events, map
af_purchase, af_subscribe, and any other conversion events you want Meta to optimize for.4
Repeat for TikTok
Find TikTok for Business and repeat the same process.
Set event postbacks to All media sources including organic for the Install event. This ensures Meta and TikTok receive data for all installs, not just their own attributed ones.
Custom Attribution Links
Create campaign-specific OneLink URLs to track performance per campaign, ad set, or creative.1
Open OneLink Management
Go to Engage > OneLink Management in your AppsFlyer dashboard.
2
Create a link
Select your OneLink template and click Add Link.
3
Configure the link
Set the media source, campaign name, and any custom parameters like
deep_link_value or page_id.4
Use in your ads
Paste the generated link directly into your TikTok or Meta ad creative as the destination URL.
Ad Revenue Tracking
Report impression-level ad revenue back to AppsFlyer per platform. This enables LTV and ROAS reporting per acquisition channel, so you can see which campaigns drive the most revenue, not just the most installs. Uselog_ad_revenue each time an ad is shown to the user.
- Meta / Facebook
- TikTok
- AdMob
string
required
Ad network name. Accepted values:
"facebook", "tiktok", "admob".string
required
3-character ISO 4217 currency code, e.g.
"USD", "EUR", "AED". Defaults to "USD" if omitted.number
required
Revenue amount for this ad impression. No commas or currency signs.
string
Type of ad served. Accepted values:
"banner", "interstitial", "rewarded", "native".string
Your ad unit ID from the ad network.
Web-to-App Attribution
If users discover your app through your website before installing, add the AppsFlyer Smart Banner to stitch the web visit to the app install. Without this, users who visit your site and later install the app appear as organic in AppsFlyer. Add this to your website<head>:
Frequently Asked Questions
Why use AppsFlyer instead of the Meta and TikTok SDKs directly?
Why use AppsFlyer instead of the Meta and TikTok SDKs directly?
If you install the Meta SDK and TikTok SDK separately, each platform only sees its own data and will overclaim credit for the same install. AppsFlyer acts as a neutral middleman. It determines which channel actually gets credit using last-click attribution and reports back to each platform what it earned, so your ROAS numbers become trustworthy.
Will Meta and TikTok numbers always match AppsFlyer?
Will Meta and TikTok numbers always match AppsFlyer?
No, and that is expected. Meta and TikTok use their own attribution models, which typically show higher install counts than AppsFlyer. AppsFlyer’s numbers are more accurate for your own budget decisions. Use AppsFlyer to decide where to spend, and use the Meta and TikTok dashboards to manage creatives.
What events should I map for TikTok and Meta optimization?
What events should I map for TikTok and Meta optimization?
Map
af_complete_registration, af_purchase, and af_subscribe at minimum. These give the ad algorithms enough signal to find users likely to convert. If you only map installs, the algorithms optimize for install volume, which rarely correlates with revenue.Resources
NPM Package
despia-native
Smart Banners Docs
AppsFlyer Smart Banner SDK reference
Meta Ads Integration
Meta ads event mapping guide