PBA media source attribution rules

At a glance: Measure the impact of marketing efforts to drive effective website traffic. Which media sources, types, and channels are responsible for visits and conversion events. Ad level metrics available. 


Website visits and web events

  • Recognizing a visit: PBA records a visit according to visit recognition rules. 
  • Visit attribution 
    • To determine the media source responsible for bringing a user to the website, PBA analyzes the query parameters on the URL and the HTTP document referrers collected by the web SDK.
    • Rules-based media source determination uses the data collected as detailed in this article. Similarly, media type and media channel are determined. 
    • The visit is recorded in PBA raw data.
  • Campaign information is extracted from:
  • Web event
    • A web event occurs when a visitor performs an action on the website, for example, product search, product selection, or purchase.
    • Events are attributed to the visit of the most recent non-direct web visit, occurring during a 30-day look-back window.
    • Events are sub-divided into: 
      • Conversion events: Significant events designated by the marketer. For example, purchase or registration.
      • Standard events: Other events.
    • Learn more about PBA website attribution URL best practices.

PBA dashboards and raw data reports make use of the attributed media sources, types, channels, and campaigns.


For ease of understanding, the table that follows contains examples of the determined media source with their type and channel. 

Media source Media type Media channel
Direct Earned Direct
  • Social Facebook
  • Social X (formerly Twitter)
Owned Social media
  • Meta ads
  • X Ads
Paid Social media

Google search

Earned Organic search
Email Owned Email
googleadwords_int Paid Ad


Earned Referral

Determining the media source

PBA determines the media source, media type, and media channel in a hierarchical manner. This means determining the relevant media source rule and media source. Afterward, the media type and media channel are determined.

Media source rules

Media source rules as shown in the following table are ranked from high to low priority:

Media source rule  Resolving the media source 
Prevent self-attribution

To prevent attributing events to the website itself (self-attribution), and other related domains, a domain exclusion list is used. The list consists of:

  • Primary domain: Determined by the URL of the web app included in the brand bundle
  • Internal domains: Domains forming part of the brand
  • External domains: Payment gateways and payment processing sites set by you and some domains, like PayPal and Stripe, set by AppsFlyer are automatically excluded

Resolve to the pid value in the URL. For some SRNs, resolve the pid to the SRNs commercial name for consistency and clarity. For example, pid=facebook_int resolves to Facebook Ads, twitter_int resolves to Twitter.

Click IDs

Major ad networks, like Google, use click IDs to auto-tag campaigns. Click IDs resolve as follows:

  • gclid: Google click ID resolves to googleadwords_int. Note! The GCLID solution is not officially supported by Google, who may deprecate it in the future.
  • dclid: DoubleClick click ID resolves to doubleclick_int.
  • msclkid: Bing click ID resolves to bingsearch_int.
UTM parameters UTM custom rules
utm_source utm_medium Media source
  • email, mail, e-mail
  • Note! If utm_medium contains one of these values, the utm_source is ignored.
google cpc/ppc/paidsearch/search googleadwords_int
google cpm/display/banner/video/listing doubleclick_int
dfa / dbm cpm doubleclick_int


cpc/ppc/cpm/cpa/paidsocial/paid-social Facebook Ads
bing cpc bingsearch_int
yahoo / gemini cpc/display/listing yahoogemini_int
twitter cpc X Ads
snapchat swipe snapchat_int
pinterest cpc pinterest_int

If there is no custom rule match, the media source resolves to the value of the utm_source parameter.

Information about UTM parameters

Referrer The referrer is the HTTP source that sent the user to the website. The media source is the domain name of the referrer.

Media source type

Marketers usually segment web media sources into three types:

  • Paid: ad campaigns like display banners, videos, and search ads.
  • Owned: marketing campaigns that come from owned media meaning, email campaigns, social posts, blogs.
  • Earned: direct or organic traffic from search engines, referrals, and actual direct traffic.

The media type is determined by referencing the media source rule used in combination with the media source/other parameters.

Applicable media source rule Media source Media type

The pid rule determined if the media source is: 

  • Social Facebook
  • Social X (formerly Twitter)
  • SMS
  • Blog
  • Email
Any other media source Paid
Click ID

Determined using a click ID:

  • gclid
  • dclid
  • msclkid
UTM custom rules determine the media source Paid
Any other media source Owned

Referrer domain value is one of the following:

  • googleads.g.doubleclick.net 
  • tpc.googlesyndication.com


Any other media source


Media source channel

The media channel is determined by rules as listed here.

Priority Media channel rule Values Media channel
Highest priority The media source is one of the listed values Direct Direct
  • Google Search
  • Yahoo Search
  • Bing Search
Organic search
  • facebook
  • twitter
  • snapchat
  • pinterest
  • linkedin
  • whatsapp
Social media
Email Email
  Media type is Paid  
  Media source determined by referrer   Referral
Lowest priority No other prior condition matched   Other

Determine the campaign

  • Campaigns are determined using:
    • Campaign URL parameters, per media source URL parameters. 
    • Gclid click ID and using Google Ads integration
  • If the relevant campaign parameter is not found on the URL, then the campaign is not derived.
Media source parameter used Campaign parameter used
pid AppsFlyer media source parameters available on the URL are used to populate raw data and the Website Attribution dashboard. Available parameters: af_c_id, af_adset, af_adset_id, af_ad_id
Click ID—gclid Get via API from Google Ads
utm_source utm_campaign

Additional attribution rules

Visit recognition rules

A visit to the website is recorded using the following rules and considering the current session status. An active session is a session having less than 30 minutes of inactivity. 

  • Don't record a visit if the user came from an external excluded domain.
  • During an active session: record a visit if the page load includes a media source.
  • If there is no active session: record a visit.
  • There is no minimum visit time. 

PBA visit recording rules


Data finalization

  • Data finalization:
    • For Web-Assisted Installs, Website Attribution, and Conversion Paths, PBA identifies additional related events during the first 7 days after the conversion. This can change the media source identified as being ultimately responsible for driving the conversion. 
    • In the related raw-data reports, the final_data field is false during the initial 7-day period.