At a glance: Attribution links report user activity related to clicks and mobile ad impressions to AppsFlyer. Clicking on an attribution link redirects the user to download the app. A copy of the URL clicked is sent to AppsFlyer. Portions of the link are used to populate raw data reports.
AppsFlyer base attribution link
The base attribution link contains the minimum information required to record the click and redirect the user to download the app. Additional parameters are added to the link after the ? character, to record extra information.
http://app.appsflyer.com/{app_id}?pid={media_source}
The base attribution link includes the {App_id}, which is the Application ID for Apple iTunes/App Store app, or the package name for Google Play, as well as the paid (media source). This is the minimum requirement for an attribution link.
Note: For Amazon apps, use the bundle/package name (versus the ASIN).
Example
http://app.appsflyer.com/com.greatapp?pid=chartboost_int&c=christmas_sale&af_adset_id=54822
Attribution link parameters
The following parameters are available for use within the generated attribution link.
The number in the Field type column is the character limit of the parameter value. Find more about limitations on the length of parameter values here.
Parameters | Display name in raw data | Description |
Field type |
---|---|---|---|
pid | Media Source | Uniquely identifies an AppsFlyer integrated partner. Don't change it. More details. |
String 50 |
c | Campaign | Provided by the advertiser/publisher. Campaign names that exceed 100 characters in length are displayed on the dashboard as "c_name_exceeded_max_length" |
String 100 |
af_prt |
Agency |
|
String 50 |
af_mp |
N/A |
|
|
clickid |
N/A |
Ad network unique click identifier |
|
af_siteid |
Site ID |
Ad Network publisher ID |
String 24 |
af_sub_siteid |
Sub Site ID |
Ad Sub-Network/Publisher ID |
String 50 |
af_c_id |
Campaign ID |
Provided by the advertiser/publisher |
String 24 |
af_adset |
Adset |
|
String 100 |
af_adset_id |
Adset ID |
Provided by the advertiser/publisher |
String 24 |
af_ad |
Ad |
Ad Name (see more) provided by the advertiser/publisher |
String 100 |
af_ad_id |
Ad ID | Provided by the advertiser/publisher |
String 24 |
af_ad_type |
Ad type |
Use the following naming convention:
|
String 24 |
af_click_lookback |
Attribution lookback window |
Note: Only affects click URLs and not impression URLs. |
3 char max |
af_viewthrough_ |
N/A |
Note: Only affects impression URLs and not click URLs |
3 char max |
af_channel |
Channel |
The media source channel through which the ads are distributed, e.g., UAC_Search, UAC_Display, Instagram, Facebook Audience Network etc. |
Dynamic Enum. String 20 |
af_keywords |
Keywords |
Keywords list for text-targeted campaigns |
String 100 |
af_cost_model |
Cost model |
|
String 20 |
af_cost_currency |
Cost currency |
|
Enum. 3 char |
af_cost_value |
Cost value |
|
String 20 |
af_sub[n] (n=1-5) example: af_sub1 |
Sub param [n] |
Optional custom parameter defined by the advertiser. For more information about the usage of these parameters check the FAQs section. |
String 100 |
af_r | N/A |
Redirect users to the specified URL for both platforms (Android and iOS). |
|
af_web_dp | N/A | URL to redirect desktop (for example, Windows or Mac) users to a different web page than configured in the OneLink template. Use this to keep attribution data of desktop users on other platforms (e.g. Google Analytics or Omniture) | |
af_dp | N/A | The fallback value to launch the app, to be used if the Universal Link or Android App Link method fails, and for Android users below 6.0. It should only point to the base path, i.e. the default activity. | |
af_force_deeplink | N/A | Force deep linking into the activity specified in af_dp value | |
af_ref | N/A |
Ad networks working with S2S clicks can send a unique referrer value using the following parameter: &af_ref=ReferrerValue
The af_ref value must consist of a unique value, structured as follows:
NetworkName_UniqueClickValueForEachClick
Example: af_ref=networkname_123456789ABCDEF
The network name can be any valid string. It can be networkname_int or just networkname.
AppsFlyer may use this parameter for attribution in Android devices. AppsFlyer doesn't use this parameter for attribution in iOS or Windows devices.
|
|
is_incentivized | N/A |
Boolean: true/false
Incentivized or non-incentivized campaigns
|
|
af_param_ forwarding |
N/A |
|
|
af_os | OS version | [For iOS only] The device operating system version | |
af_model | iOS model type |
[For iOS only] The device model. Values permitted:
|
Parameters | Display name in raw data | Description |
Field type |
---|---|---|---|
is_retargeting |
Is Retargeting (campaign) | The click URL of all retargeting campaigns must include &is_retargeting=true .If the parameter is not included or its value is "false" the campaign is considered as a regular user acquisition campaign. |
Enum 5 char |
af_reengagement_window |
Re-engagement window |
Change the re-engagement attribution window by adding this parameter to the attribution link. The possible window range options are:
Default value: 30 days Example: |
3 char max |
Ad type parameters
Depending on the ad type, you can also send the relevant viewability parameter detailing the specifications of the engagement. Below is a list of possible values for “af_ad_type” along with the expected viewability parameters.
Parameter | Value format | Description |
---|---|---|
af_video_total_length | The total possible duration of the video | |
af_video_played_length | How much of the video was viewed | |
af_playable_played_length | How long the playable element was played once fully loaded | |
af_ad_time_viewed | How long the ad unit was visible on the screen | |
af_ad_displayed_percent | The maximum percentage of the ad unit that was visible on the device screen | |
af_audio_total_length | The total possible duration of the audio | |
af_audio_played_length | How much of the audio was heard |
Android-specific parameters
Parameter | Display name in raw data | Description |
Field type |
---|---|---|---|
advertising_id |
Advertising ID |
Google Advertising ID - Requires ad network support |
40 char max |
sha1_advertising_id |
N/A |
Google Advertising ID hashed with SHA1 - Requires ad network support |
|
md5_advertising_id |
N/A |
Google Advertising ID hashed with MD5 - Requires ad network support |
Supported with installs and re-attributions only |
android_id |
Android ID |
Device Android_id - Requires ad network support |
20 char max |
sha1_android_id |
N/A |
Device Android_id hashed with SHA1 - Requires ad network support |
|
md5_android_id |
N/A |
Device Android_id hashed with MD5 - Requires ad network support |
Supported with installs and re-attributions only |
imei |
IMEI |
Device IMEI ID |
|
sha1_imei |
N/A |
Device IMEI ID hashed with SHA1 - Requires ad network support |
|
md5_imei |
N/A |
Device IMEI ID hashed with MD5 - Requires ad network support |
|
oaid |
OAID |
Open Anonymous Device Identifier |
Available as of Android SDK version 4.10.3 |
sha1_oaid |
N/A |
Open Anonymous Device Identifier hashed with SHA1 - Requires ad network support |
Available as of Android SDK version 4.10.3 |
md5_oaid |
N/A | Open Anonymous Device Identifier hashed with MD5 - Requires ad network support | Available as of Android SDK version 4.10.3 |
af_android_url |
N/A |
Redirect Android users to a different URL than the app page on Google Play. Use for out-of- store apps |
|
sha1_el |
N/A |
Used for desktop to mobile attribution - email hashed with SHA1. Requires ad network support |
|
fire_advertising_id |
N/A |
Amazon Fire Advertising ID |
|
iOS Specific Parameters
Parameters | Display Name | Description |
---|---|---|
idfa |
IDFA |
Use upper case. Requires ad network support Field type: 40 char max |
idfv |
IDFV | Use upper case. |
af_ios_url |
Redirect iOS (iPhone or iPad) users to a different URL than the app page on iTunes |
Use this for landing page redirections |
af_ios_fallback |
N/A |
Supply fallback URL for users of iOS 10.3 users |
sha1_idfa |
N/A |
IDFA hashed with SHA1. Requires ad network support |
sha1_idfv |
N/A |
IDFV hashed with SHA1 |
mac |
N/A |
Device mac address. Requires ad network support |
md5_idfv |
N/A |
IDFV hashed with MD5 |
sha1_mac |
N/A |
Device mac address hashed with SHA1. Requires ad network support |
Example
http://app.appsflyer.com/{app_id}/?pid=airpush_int&c=RedBanner&
af_siteid={publisher_id}&af_sub1=1.5&af_sub2=USD&af_sub3=burst_campaign
All parameters are available in the Installation Report and the Analytics, Reports and APIs.
Custom parameters
In addition to default, Android specific and iOS specific parameters, you can also specify custom parameters. These custom parameters can help you if you wish to customize user experience and content according to the attribution link that leads to an install.
You can append custom parameters to the attribution link in the format parameter=value
. For example:
http://app.appsflyer.com/com.greatapp?pid=networkx_int&c=winter&af_adset=coats&af_ad=cashmere&my_custom_param=my_custom_value
Two important things to know about custom parameters:
- Custom parameters don't appear in raw data.
- Custom parameters can be retrieved from the get conversion data SDK API.
Why is publisher ID (PID) the Most Important Parameter?
Among all available attribution link parameters PID stands out as the only parameter that MUST be included in every attribution link.
PID, Publisher ID, is actually the media source name. This is the primary field for attributing the install to its source.
Integrated Partners have their own unique PID value, which ends with "_int". When using Custom Attribution Links you can set any PID name you'd like, as long as it's not reserved by integrated partners.
Here are some examples of important integrated publisher IDs: organic, googleadwords_int (Google AdWords), Facebook ads, Twitter. You can use any name for non-integrated sources like email, sms or mail pigeons.
Avoid common PID issues
Consider the following PID rules when using this parameter:
Without the PID on the attribution link the user is automatically attributed to a "None" media source and the original installation source is gone.
Tip
Avoid using white spaces in the PID value, or make sure to URL encode your attribution links before using them.
Levels of data granularity
You can use up to four URL parameters to reach deep dive into your ads performance.
Using all 4 parameters on all your active attribution links enables you to:
- Attribute all user installs and events to specific ads
- Drill down and compare performance of all your ads per ad set, per campaign and per media source on aggregated reports to optimize on every level
- Compare all of your ads across all media sources on the raw data reports and Pivot table
The parameters are:
Media source (pid=)
campaign name (c=)
Ad set (af_adset=)
Ad name (af_ad=)
Example
The following attribution link uses 4 levels of granularity to record the "cashmere" ad in the "coats" ad set in the "winter" campaign running on the integrated "networkx" media source.
http://app.appsflyer.com/com.greatapp?pid=networkx_int&c=winter&
af_adset=coats&af_ad=cashmere
FAQ
Should I use lower or upper case letters for parameters
You can use either but you must be consistent. If you set a custom parameter with upper or lower case characters, make sure to always use that parameter.
For example, if you set pid=MyMediaSource make sure to always use it. If you use pid=MyMediaSource on one attribution link and pid=mymediasource on another, discrepancies in data might occur. The same goes for any other param that you set on the attribution link.
Is AppsFlyer's attribution link dynamic or static?
How can you tell if a link is dynamic or static?
If the attribution link contains parameters, it's a long pre-defined attribution link, and therefore static.
Only shortened URLs, used for custom attribution links, are dynamic.
This means that once you start using an attribution Link for an integrated partner, or a long URL for owned media, it would not change for any leads engaging with it, even if you change the attribution link values on AppsFlyer's dashboard. For the change to take place, you need to use the new long URL going forward.
On the other hand, shortened URLs for owned media, don't directly contain parameters. When a lead engages with an AppsFlyer's shortened URL, the lead is redirected to AppsFlyer and the current set parameters take place dynamically.
What is this Play Store error message?
If you ever encounter the following error message in the Play Store after following an attribution Link:
https://app.appsflyer.com/com.travelco?pid=globalwide_int&clickid=#reqid#
Usually, these characters are in the link because they are macros, and are dynamically replaced by a value, so it is not a really big problem and you can ignore the message.
What are subscriber parameters good for?
Example
A hail ride app, Luber, has creatives with 3 color templates: blue, yellow and red. Luber's mobile marketer, Linda, wants to test which color template brings in more installs. To do so she adds &af_sub3=blue
in the attribution links of all the blue ads across ALL non-SRN media sources. The same is done for the yellow and red ads as well. With this information parsed and appearing in the raw data reports, Linda is able to analyze the success of the different colored ads, and pick the best converting one.
What is the maximum length for a campaign name?
c_name_exceeded_max_length
Tip
Video: Noam Gohary from Playtika reveals the 3 best methods for optimizing your link structure and data.