Use traffic source resolution to identify the initial media source, campaign, and channel for each web visit, using the URL parameters and referrer data available at landing page load. This gives attribution the traffic-source context it needs to attribute downstream web events, including the user-acquisition event, accurately.
What is traffic source resolution?
For web attribution, the landing page load (web visit) is the user’s first engagement with the website. AppsFlyer relies on information available at the time, such as URL parameters and referrer data, to identify the user's media source, campaign, and channel.
This process, known as traffic source resolution, identifies and resolves media source and campaign information from URL parameters. AppsFlyer captures and prioritizes these parameters to determine the initial traffic source context for a visit.
Traffic source resolution is a pre-attribution process. The resolved parameters may be overridden later during the attribution process.
The role of traffic source resolution does not end with the visit. Its outcome provides the traffic-source context that the attribution process later uses to attribute subsequent web events, including the user-acquisition event.
Understanding the mechanics of traffic source resolution is essential for constructing accurate URLs. To learn how to create a well-structured URL, see Choose attribution parameters for landing page URLs.
The traffic source resolution flow
Traffic source resolution follows a structured, multi-step flow that progressively builds the attribution context for each web visit. Each step contributes a specific layer of information, from capturing the visit itself to classifying the traffic for reporting. The data used by the traffic source resolution flow is captured either by the web SDK or Web S2S.
The flow consists of the following steps:
- Visit recording: Captures the user’s arrival on the website and logs a visit event, even when the traffic source is not yet known. This makes sure that all eligible user entries are measured before the attribution logic is applied.
- Media source resolution: Analyzes URL parameters and referrer data to identify the platform or partner that drove the visit, or determines that the visit is organic.
- Campaign resolution: Resolves granular campaign details associated with the identified media source, enabling detailed performance analysis.
- Channel classification: Assigns each visit to a high-level traffic channel using the resolved media source and information from your campaign links and referring website, providing a standardized view for reporting and analysis.
Step 1: Visit recording
Visit recording is the initial step in the Web Performance Measurement flow. It happens before media source resolution and attribution, serving as a preprocessing layer that captures raw user activity.
The logic works in two stages. First, it classifies the referrer (the domain the user came from before landing on your site). Then, based on the referrer type, it evaluates the user's session state and the presence of media source information to decide whether to record the visit.
Stage 1: Referrer classification
AppsFlyer classifies the referrer into one of three types:
- External excluded (for example, a payment processor or any domain you've excluded)
- Internal excluded (for example, your own subdomains or login flows)
- Else (all other referrers)
Stage 2: Session evaluation and visit recording
Based on the referrer type, AppsFlyer evaluates the session state and decides whether to record the visit:
- External excluded: The visit is never recorded.
-
Internal excluded: Referrer-based attribution is suppressed, because the referrer isn't a real acquisition source.
- If there's an active session (a session is considered inactive after 30 minutes of inactivity; otherwise, it's active), the visit isn't recorded.
- If there's no active session, the visit is recorded, but the referrer is treated as a self-referral and ignored. The visit is recorded as organic unless the URL includes attribution parameters (UTM, PID, click ID, etc.).
-
Else:
- If there's no active session, could you record the visit? A fresh session counts as a new visit, regardless of other conditions.
- If there's an active session and a non-direct media source is present (UTM, PID, click ID, etc.), record the visit. This revisit may trigger a retargeting conversion (re-engagement), which is used to attribute subsequent events.
- If there's an active session and no media source information is present, don't record a new visit within that session.
Step 2: Media source resolution
The media source resolution process determines if a visit is:
- Non-organic: A specific attribution source is found.
- Organic: No attribution source is identified (for example, the user typed the URL directly or used a bookmark).
During the media source resolution process, AppsFlyer determines the origin of a web visit by evaluating parameters extracted from the landing page URL path and query string.
For best results, use AppsFlyer-specific parameters, such as pid and af_campaign, which provides the highest level of granularity and control. AppsFlyer also recognizes industry-standard parameters, such as UTM tags and click IDs, allowing you to get started immediately without changing your existing ad measurement setup.
AppsFlyer follows a priority order to resolve the media source. The process stops as soon as a source is successfully identified. The media source resolution process consists of the following steps:
1. Exclude domains
First, AppsFlyer checks if the visit comes from a domain on your Exclude list. If the domain is excluded (for example, your internal domain or a payment processor like PayPal), the visit is automatically ignored or classified as Organic.
For more information about how to specify the excluded domains when adding a web app to AppsFlyer, see Excluded domains.
2. AppsFlyer PID (partner ID)
If the domain is not excluded, AppsFlyer looks for the pid= parameter in the URL.
- If found, the media source is taken directly from this value.
- The following social media partners use specific display labels instead of the raw URL parameter value.
| URL parameter (PID) | Media source display name |
|---|---|
pid=iossearchads_int |
Apple Search Ads |
pid=facebook_int |
Facebook Ads |
pid=metaweb_int |
Facebook Ads |
pid=twitter_int |
|
pid=twitterweb_int |
|
pid=googleads_int |
googleadwords_int |
pid=tiktokweb_int |
tiktokglobal_int |
pid=snapweb_int |
snapchat_int |
3. UTM parameters
If no PID is found in the URL, AppsFlyer evaluates the utm_source and utm_medium parameters to identify the media source. The combination of these two fields determines the resulting resolution.
How UTM logic works
- In most cases, AppsFlyer determines the media source by extracting the raw value of
utm_sourceand using it as the media source. - If
utm_mediumisemail,mail, ore-mail, the media source automatically resolves toe-mail. - If
utm_mediumis present and is not an email value, AppsFlyer checks the value against specific custom mapping rules (see the mapping table below). - If
utm_mediumis missing or doesn’t match any custom rule, AppsFlyer falls back to usingutm_sourceas the media source.
UTM mapping rules
| utm_source | utm_medium | Media source |
|---|---|---|
| Google, googleads_int | cpc / ppc / paidsearch / paid_search / paid-search / search / paid | googleadwords_int |
| cpm / display / banner / video / listing | dv360_int | |
| dfa / dbm / dcm / doubleclick | cpm | dv360_int |
| Facebook / FB / Meta, metaweb_int, facebook_int | cpc / ppc / cpm / cpa / paidsocial / paid-social / paid_social / paid | Facebook Ads |
| Bing / microsoft / ms | cpc / ppc / paidsearch / paid_search / paid-search / search / paid | bingsearch_int |
| Yahoo / gemini | cpm / display / listing | yahoogemini_int |
| twitter, twitter_int, twitterweb_int | cpc / ppc / paid / paidsocial / paid-social / paid_social | |
| Snapchat / snap, snapweb_int | swipe / cpc / ppc / paid / paidsocial / paid-social / paid_social | snapchat_int |
| cpc / ppc / paid / paidsocial / paid-social / paid_social | pinterest_int | |
| tiktok, tiktokweb_int | cpc / ppc / paid / paidsocial / paid-social / paid_social | tiktokglobal_int |
| iossearchads_int | any / none | Apple Search Ads |
| chatgpt.com | paid: cpc / ppc / cpm / paid / paid_search / paidsearch / display / banner / video | openai_int |
| chatgpt.com | none of the above* | chatgpt_organic_aeo (channel: aeo) |
| perplexity | any / none | perplexity_organic_aeo (channel: aeo) |
*If an oppref click ID is present, AppsFlyer skips this row and resolves the visit from oppref instead (see Click IDs).
4. Click IDs
If neither a PID nor UTM parameters are present in the URL, AppsFlyer attempts to identify the media source using Click IDs. These are unique identifiers automatically appended to URLs by specific ad networks.
AppsFlyer uses the following Click ID mapping to attribute the visit:
| Click ID parameter | Resolved media source |
|---|---|
gclid, wbraid, or gbraid
|
googleadwords_int |
msclkid |
bingsearch_int |
twclid |
|
vmcid |
yahoogemini_int |
sccid |
snapchat_int |
li_fat_id |
linkedin_int |
ttclid |
tiktokglobal_int |
tbclid |
taboola_int |
ob_click_id |
outbrain_int |
dicbo |
outbrain_int |
yclid |
yandex_int |
rdt_cid |
reddit_int |
|
pinterest_int |
|
openai_int |
- AppsFlyer doesn’t use fbclid for traffic source resolution because Meta appends it to both paid and organic Facebook clicks. To attribute traffic to Meta, include pid=facebook_int or set utm_source to the relevant Meta source value.
- The dclid parameter is not used for media source resolution. dclid is a Campaign Manager 360 (CM360) identifier that can appear alongside other click IDs, such as fbclid (Facebook) or ttclid (TikTok), when CM360 is used. Using dclid alone can result in the wrong resolution.
5. HTTP referrer
If no query parameters (PID, UTMs, or Click IDs) are found in the URL, AppsFlyer uses the http_referrer to identify the traffic source. This relies on an internal parsing mechanism that extracts the domain host and maps it to a media source.
The parsing mechanism
AppsFlyer first checks the specific referrer mappings below. If none applies, the media source is the referring domain, including its complete domain suffix.
AppsFlyer removes subdomains and the URL’s scheme, port, path, query string, and fragment. The resulting domain is lowercase and has no trailing dot.
| Referrer | Resolved media source |
|---|---|
https://www.mywebsite.com?param=example |
mywebsite.com |
https://m.facebook.com/ |
facebook.com |
https://www.youtube.com/watch?v=example |
youtube.com |
https://shop.example.co.uk/products |
example.co.uk |
https://www.example.com.br/ |
example.com.br |
https://facebook.example.com/ |
example.com |
https://example.com/facebook |
example.com |
https://t.co/example |
t.co |
https://x.com/example |
x.com |
Sites on shared hosting resolve to the provider’s domain. For example, alice.github.io resolves to github.io, and publisher-a.s3.amazonaws.com resolves to amazonaws.com.
Referrer mapping rules
| If the domain host contains… | Resolved media source |
|---|---|
mail. or outlook.
|
|
googleads.g.doubleclick.net |
googleadwords_int |
tpc.googlesyndication.com |
dv360_int |
Search engine mapping
| If the domain host contains… | Resolved media source |
|---|---|
google. |
google_organic_seo |
search.yahoo |
yahoo_organic_seo |
bing.com |
bing_organic_seo |
ask.com, de.ask.com, uk.ask.com
|
ask_organic_seo |
duckduckgo.com |
duckduckgo_organic_seo |
yandex.com, yandex.ru
|
yandex_organic_seo |
search.naver.com |
naver_organic_seo |
daum.net |
daum_organic_seo |
baidu.com |
baidu_organic_seo |
ecosia.org/search |
ecosia_organic_seo |
coccoc.com/search |
coccoc_organic_seo |
sogou.com |
sogou_organic_seo |
yahoo.co.jp |
yahoojapan_organic_seo |
All rows in this table resolve to channel seo.
AI answer engine referrer mapping
| If the domain host contains… | Media source | Channel |
|---|---|---|
chatgpt.com, chat.openai.com
|
chatgpt_organic_aeo | aeo |
perplexity.ai |
perplexity_organic_aeo | aeo |
gemini.google.com |
gemini_organic_aeo | aeo |
claude.ai |
claude_organic_aeo | aeo |
deepseek.com |
deepseek_organic_aeo | aeo |
manus.im |
manus_organic_aeo | aeo |
grok.com |
grok_organic_aeo | aeo |
copilot.microsoft.com |
copilot_organic_aeo | aeo |
Android app referrers
If the visit originates from an Android app, the referrer host is mapped as follows:
| App referrer string | Resolved media source |
|---|---|
com.google.android.googlequicksearchbox |
Google Search |
com.google.android.gm |
|
com.linkedin.android |
|
com.twitter.android |
|
org.telegram.messenger |
telegram |
Step 3: Campaign resolution
Once the media source is confirmed in Step 2, AppsFlyer attempts to identify the specific campaign details.
AppsFlyer pulls campaign information from the following URL parameters, in order of priority:
| URL parameter(s) | Maps to | Priority order |
|---|---|---|
c, af_campaign, utm_campaign
|
Campaign name |
|
af_c_id, af_campaign_id
|
Campaign ID |
|
af_adset |
Ad set name | — |
af_adset_id |
Ad set ID | — |
af_ad |
Ad name | — |
af_ad_id |
Ad ID | — |
af_keywords |
Keywords | — |
Step 4: Channel classification
Channels group media sources into categories to simplify your reporting and help you compare performance. For example, you can view Facebook Ads and TikTok together as paid social traffic. Use AppsFlyer’s automatic categories or define your own to match your reporting needs.
Overriding the channel with af_channel
To use your own reporting categories, add af_channel to the landing page URL. For example, af_channel=Social sets the channel to Social.
AppsFlyer uses this value only when a media source is identified. If no media source is identified, the channel is direct, even if af_channel is present.
Default channel classification
If you don’t set a custom channel, AppsFlyer assigns one using information from your campaign links and referring websites.
AppsFlyer assigns a paid channel when it recognizes a paid source or a supported utm_medium. For messaging, organic_video, and organic_social, AppsFlyer matches complete recognized source names or recognized domains and their subdomains. For example, instagram, ig, instagram.com, and m.instagram.com can match organic_social, while Instagram Bio does not. Paid-channel rules are evaluated before these categories.
| Channel | Traffic included |
|---|---|
paid_ai |
Paid traffic from supported AI assistants, such as ChatGPT. |
paid_social |
Paid social traffic, such as ads on Facebook, TikTok, or LinkedIn. |
paid |
Paid advertising, such as search, display, shopping, and video ads. |
email |
Traffic from email campaigns and email services. |
messaging |
Traffic from messaging and communication services, such as WhatsApp, Telegram, Slack, or Microsoft Teams. |
aeo |
Organic traffic from AI answers, such as links in ChatGPT or Perplexity responses. |
seo |
Organic traffic from search engines, such as Google or Bing. |
organic_video |
Organic traffic from video services, such as YouTube, Vimeo, or Twitch. |
organic_social |
Organic traffic from social platforms, such as Facebook, Instagram, TikTok, or Reddit. |
referral |
Visits referred by other websites that don’t fit the categories above. |
direct |
Visits with no identified traffic source, such as when someone types your URL or uses a bookmark. |
other |
Traffic from custom campaign sources that don’t fit any of the categories above. |
Notes:
- By default, Google Ads traffic is grouped under
paid, which combines search, display, shopping, and video advertising. - For broader reporting groups, use custom dimensions based on Channel. For example, combine
seo,aeo,organic_social, andorganic_videounder Organic.