Installation
- Bundle
- CDN
Attribution data survives app restarts. It is cached natively and available on every page load without any additional setup or API calls.
Attribution Variables
Three variables are injected by native on every page load. They are read-only.appsFlyerReferrer
A normalized string identifying the traffic source. Built automatically from raw attribution data. No parsing required.All possible values
All possible values
| Value | Meaning |
|---|---|
tiktok_ad | Paid TikTok campaign |
tiktok_organic | Organic TikTok traffic |
facebook_ad | Paid Meta / Facebook / Instagram campaign |
facebook_organic | Organic Meta traffic |
google_ad | Paid Google / AdMob campaign |
google_organic | Organic Google traffic |
snapchat_ad | Paid Snapchat campaign |
twitter_ad | Paid Twitter / X campaign |
affiliate_[code] | Affiliate traffic, suffixed with the affiliate code |
organic | No identifiable media source |
raw utm_source | Any other tracked source |
If a
deep_link_value is present in the attribution data, it is used as the referrer directly before falling back to the media source logic. If an affiliate_code is present, the referrer becomes affiliate_[code].appsFlyerAttribution
The full attribution object containing all campaign, ad set, deep link, affiliate, and cost data from AppsFlyer.Raw media source from AppsFlyer, e.g.
"tiktokads_int", "facebook", "googleadwords_int"Campaign name set in the ad platform
Campaign ID
Ad set name
Ad set ID
Individual ad name
Individual ad ID
Channel within the media source
Click ID from the ad network
Publisher site ID
UTM source parameter from the campaign link
UTM medium parameter
UTM campaign parameter
UTM content parameter
UTM term parameter
Affiliate code if the install came from an affiliate link
Deep link destination value set in the OneLink URL, e.g.
"product", "collection", "offer"Deep link sub-parameter 1
Deep link sub-parameter 2
Whether the install was organic (not from a paid campaign)
One of
"install", "re-engagement", or "re-attribution"Whether this is the user’s first ever app launch
Unique AppsFlyer user ID
Cost model of the campaign, e.g.
"cpi", "cpa"Cost value of the install
Currency of the cost value
Timestamp of the ad click
Timestamp of the app install
Example response
Example response
appsFlyerUID
A unique ID assigned by AppsFlyer to every install. Use this to stitch user journeys across web and app or to match events in server-side reporting.- Fire and forget
- Await
Request Attribution On Demand
Attribution is injected on load automatically. If attribution arrives after the page has already rendered, or if you need the latest data mid-session, request it explicitly.- Fire and forget
- Await
Example: Personalize Onboarding by Source
Resources
NPM Package
Install the Despia SDK
AppsFlyer Attribution Model
How AppsFlyer attributes installs
Support
Contact our support team