Media source and campaign mapping in people-based attribution

At a glance: Media source and campaign mapping in People-Based Attribution (PBA).

Media source mapping

  • Media source mapping:
    • Decides which media source is credited for bringing users to the website.
    • Associates the media source with the media type.
    • Differs between mobile and PBA in that:
      • Mobile mapping requires confirmation via an attribution link or SRN response. 
      • PBA incorporates uses multiple factors media source mapping.

Preventing self-attribution

Self-attribution occurs when the website itself is considered a media source. For example, if a user clicks a link from example.com that leads to about.example.com, the media source is example.com.

The desired outcome is that the website example.com is not considered a media source.  PBA uses a referral exclusion list to prevent self-attribution.

When you create a brand bundle, you specify the website domain. The PBA exclusion list prevents the domain from identified as a media source.

Determining the media source

PBA uses query parameters and referers to determine the media source this is done with the help of the Web SDK. 

Media source mapping by pid parameter

The pid query parameter has the highest priority. If the web SDK finds the pid parameter, it uses its value to determine the media source. See the following table for examples:

URL Media source name Explanation
mywebsite.com?pid=MyMediaSource MyMediaSource The web SDK finds the pid parameter on the URL and sends it to PBA. PBA then determines the media source as MyMediaSource
mywebsite.com?pid=MyMediaSource&utm_source=AnotherMediaSource MyMediaSource The pid parameter takes precedence over the utm_source

Special cases

In most cases, PBA determines the media source name as the exact value of the pid parameter. In some cases, if the pid has a value that AppsFlyer recognizes as an SRN, PBA determines the media source to be an SRN:

  URL Media source name
Regular pid mywebsite.com?pid=MyMediaSource MyMediaSource
SRN pid mywebsite.com?pid=facebook_int Facebook Ads

Other mobile-like parameters

You probably know that pid is used in mobile attribution links. Much the same way, the c parameter is used to indicate campaigns. You can use pid and c together to indicate the media source and campaign. You can see the campaign name in PBA raw data.

Media source mapping by Click IDs

Click IDs are used by major ad networks (like Google) to auto-tag campaigns. For more information about auto-tagging, see here.

Click IDs get the second-highest priority after the pid parameter. If pid is not on the URL, the web SDK tries to look for a click ID.

The web SDK looks for three types of click IDs:

  • gclid - This is a Google click ID. If this parameter is on the URL, the media source is googleadwords_int. The GCLID solution is not officially supported or recommended by Google. In case Google deprecates the GCLID parameter, the mapping logic will change to accommodate that.
  • dclid - this is a DoubleClick click ID. If this parameter is on the URL, the media source is doubleclick_int.
  • msclkid - this is a Bing click ID. If this parameter is on the URL, the media source is bingsearch_int.

Media source mapping by UTM parameters

UTM parameters are a set of parameters used to determine the source, medium, and campaign. For example, a URL with UTM parameters may look like this:

https://example.com?utm_source=media_source&utm_medium=cpc&utm_campaign=summer_sale

UTM parameters get the third-highest priority. If pid or click ID are not on the URL, the web SDK looks for UTM parameters. For media source mapping purposes, only utm_source and utm_medium are considered.

UTM email rule

If the utm_medium has email, mail, or e-mail as its value, the media source mapping resolves to Email. This is regardless of the utm_source value.

UTM custom rules

There are several combinations of utm_source and utm_medium that resolve to specific media source mapping. See the following table:

utm_source utm_medium Final media source mapping
google cpc / ppc / paidsearch / search googleadwords_int
google cpm / display / banner / video / listing doubleclick_int
dfa / dbm cpm doubleclick_int
facebook cpc / ppc / cpm / cpa / paidsocial / paid-social Facebook Ads
bing cpc bingsearch_int
yahoo / gemini cpc / display / listing / yahoogemini_int
twitter cpc Twitter
snapchat swipe snapchat_int
pinterest cpc pinterest_int

Media source mapping by the referer

The referer is the source that sends the user to the website. The web SDK looks at the referer in the browser when the user reaches the site.

The referer gets the lowest priority of all mapping methods. If there is no pid, click ID, or UTM parameters on the URL, PBA maps the media source using the referer.

In most cases, PBA maps the domain from the referer as the media source. For example, if the user reaches the site from https://somewebsite.com, the media source is mapped as somewebsite.com.

Determining media source type

PBA also determines the media source type. The media source type appears in PBA raw data but not in the PBA analysis page.

For web campaigns, marketers usually segment media sources into three types of groups:

  • Paid - ad campaigns (display banners, videos, search ads, etc.)
  • Owned - marketing campaigns that come from owned media i.e. email campaigns, social posts, blogs, etc.
  • Earned - direct or organic traffic from search engines, referrals, or actual direct traffic.

See the following methods that PBA uses to determine the media type.

Determining media source type by pid

If the URL has a pid parameter, PBA determines the media type as paid. The idea is that the pid represents an ad network or advertising source that you pay to advertise your website. The pid parameter has the highest priority

If the value of the pid is a custom media source, PBA determines the media type as owned. Custom media sources are media sources that AppsFlyer recommends using with mobile custom links. See the following list:

  • Social Facebook
  • Social Twitter
  • Email
  • SMS
  • Blog

If any of these media sources appear as the value of the pid parameter, PBA determines the media type as owned.

Determining media source type by click ID

If the URL has click ID, PBA determines the media type as paid. The click ID has the second-highest priority. If pid is not on the URL, the web SDK tries to look for a click ID. The click IDs that the SDK looks for are:

  • gclid - This is a Google click ID. The GCLID solution is not officially supported or recommended by Google. In case Google deprecates the GCLID parameter, the mapping logic will change to accommodate that.
  • dclid - this is a DoubleClick click ID.
  • msclkid - this is a Bing click ID.

Determining media source type by UTM parameters

When PBA uses UTM parameters to determine the media source, the media type is owned unless the UTM parameters answer custom rules.

Determining media type by UTM custom rules

See the following table for UTM custom rules through which PBA determines the media type as paid:

utm_source utm_medium
facebook cpc / ppc / cpm / cpa / paidsocial / paid-social
google cpc / ppc / paidsearch / search
cpm / display / banner / video / listing
yahoo / gemini cpc / display / listing
bing / twitter / pinterest cpc
snapchat swipe

Determining media source type by referer

The referer is the source that sends the user to the website. The web SDK looks at the referer in the browser when the user reaches the site.

The referer gets the lowest priority of all mapping methods. If there is no pid, click ID, or UTM parameters in the URL, PBA determines the media type using the refrrer.

In all cases, if media type is determined by referer, the media type is earned. There are two exceptions to this rule:

  • If the domain host in the referer contains https://googleads.g.doubleclick.net, the media type is paid.
  • If the domain host in the referer contains https://tpc.googlesyndication.com, the media type is paid.

Determining the media channel

PBA uses the media source to determine the media channel. Using the media channel field, you can aggregate data according to the following available channels. The media channel is currently available in PBA raw data.

Media source to media channel mapping:

Media source  Media channel
Media source is organic  Direct 

Media source is a search engine:

  • "Google Search"
  • "Bing Search"
  • "Yahoo Search"
Organic search

Media source is one of the following:

  • Facebook / facebook
  • Twitter / twitter
  • snapchat
  • linkedin
  • pinterest
  • whatsapp
Social media
Media source is "Email" Email

Media source is determined by one of the following:

  • pid
  • utm param and media type is "paid"

The media source is either googleadwords_int or doubleclick_int and was determined based on the referer.

Ad

Media source is determined by refrrer and the channel doesn't qualify as any other channel.

Referral

Media channel cannot be determined.

Other

Determining the campaign

PBA determines the campaign name by one of two params:

  • c
  • utm_campaign

Each parameter has its paired media source parameter:

Media source parameter Campaign parameter
pid c
utm_source utm_campaign

It's not possible to mix and match the two. For example, it's not possible to specify the media source using pid and the campaign using utm_campaign. Similarly, it's not possible to specify the media source using utm_source and the campaign using c.

If pid is present on the URL, PBA looks for c to determine the campaign. If it doesn't find it, it treats the campaign as none. If utm_source is present on the URL, PBA looks for utm_campaign. If it doesn't find it, it treats the campaign as none.

Was this article helpful?