AppsFlyer Tracking Link Structure and Parameters

  • Ad Networks


AppsFlyer uses tracking links to track many elements relevant to the users clicks and impressions of mobile ads.

When a user clicks on an AppsFlyer tracking link the URL is saved in AppsFlyer's data bases, and the user is redirected to download the app. Supported parameters in the link get parsed and are available via AppsFlyer's raw data reports for advanced analysis.

AppsFlyer's Base Tracking Link

The base tracking link contains the minimum information to record the click and redirect the user to download the app. Additional parameters may be added to the link after the '?' character, to track extra information.{app_id}

The base tracking link goes to AppsFlyer via It contains the {App_id} parameter, which is the Application ID for Apple iTunes/App Store app, or the package name for Google Play.


The following tracking link for the com.greatapp app uses several parameters including Publisher ID (pid), campaign name (c) and adset ID (af_adset_id). See the table below for the full list of supported tracking link parameters and their explanations.

Tracking Link Parameters

The following parameters below are available to use within the generated tracking link.


For limitations on the length of parameter values go here

Parameters Display Name Description
pid Media Source Media source name - provided by AppsFlyer for integrated partners and should not be changed. More details.
c Campaign Campaign name - provided by the advertiser/publisher. Campaign names that exceed 60 characters in length are displayed on the dashboard as "c_name_exceeded_max_length"



Agency Account Name - enables attributing new installs to the agency


Marketing Partner

Allows marketing partners of major publishers to receive postbacks per install


Currently this parameter is relevant only for Pinterest Marketing Partners.



The Ad network unique click identifier


Site ID

Ad Network publisher ID


Sub Site ID

Ad Sub-Network/Publisher ID


Campaign ID

Campaign ID - provided by the advertiser/publisher



Adset Name - provided by the advertiser/publisher. Adset is an intermediate level in the hierarchy between Campaign and Ad. See more


Adset ID

Adset ID - provided by the advertiser/publisher



Ad Name (see more) - provided by the advertiser/publisher


Ad ID Ad ID - provided by the advertiser/publisher


Ad Type

Ad Type - use one of the following name conventions: 



Lookback Window for Click Attribution. This window's duration is the maximum CTIT (Click Time to Install) for the new user to be attributed to the source displaying the ad/link.

Configurable number of days for the lookback click attribution period.  Available parameter values: 1d - 30d (days) OR 1h-23h (hours). The default value is 7d.  


Only affects click URLs and not impression URLs.


Lookback Window for View-through Attribution

Configurable number of days for the lookback view-through attribution period.  Available parameter values: 1h - 48h (hours) OR 1d - 7d (days). The default is 1d. 


Only affects impression URLs and not click URLs


Is Retargeting Campaign? 

EVERY retargeting campaign's click URL should 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. 


Re-Engagement Window

Change the re-engagement attribution window by adding this parameter to the tracking link.

You can insert here any time window from 1 day up to 90 days (1d - 90d), or from 1 hour to 36 hours (1h - 36h). The default value of this parameter is 30d.

Example - &af_reengagement_window=60d sets the re-engagement window to 60 days.



The media source channel through which the ads are distributed, e.g., UAC_Search, UAC_Display, Instagram, Facebook Audience Network etc.



Keywords list for text-targeted campaigns


Cost Model

Cost model - CPI (default) is currently the only supported model, which can populate cost value in AppsFlyer's aggregated data, e.g. on the dashboard's overview page. 


Cost Currency

Currency code (e.g. USD, EUR). Find all possible currency codes. Default value is USD.


Cost Value

Conversion cost value. Supporting up to 4 digits after the decimal point. 


Set ONLY numerical digits (use the decimal point if needed), e.g., "56", "2.85" etc.


Sub Param 1

Subscriber Parameter 1 - Optional custom parameter defined by the advertiser. For more information about the usage of these parameters check the FAQs section.

af_sub2 Sub Param 2 Subscriber Parameter 2
af_sub3 Sub Param 3 Subscriber Parameter 3 
af_sub4 Sub Param 4 Subscriber Parameter 4 
af_sub5 Sub Param 5 Subscriber Parameter 5 
af_r N/A Redirect users to the specified URL on all operating systems and platforms
af_web_dp N/A Redirect desktop 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 path for an internal activity in the app that users are deep linked into. Use this for deep linking and retargeting
af_ios_fallback N/A Supply fallback URL for users of iOS 10.3 users
af_ref N/A
Ad networks working with S2S clicks are able to 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:
is_incentivized true/false
Incentivized or non-incentivized campaigns

Android Specific Parameters

Parameter Display Name Description


Advertising ID

Google Advertising ID - Requires ad network support



Google Advertising ID hashed with SHA1 - Requires ad network support


Android ID

Device Android_id - Requires ad network support



Device Android_id hashed with SHA1 - Requires ad network support



Redirect Android users to a different URL than the app's page on Google Play. Use for out-of- store apps



Used for desktop to mobile tracking - email hashed with SHA1. Requires ad network support



Amazon's Fire Advertising ID

iOS Specific Parameters

Parameters Display Name Description



Apple Advertiser ID - should be provided using upper case format. Requires ad network support


Redirect iOS users to a different URL than the app's page on iTunes

Use this for landing page redirections



Apple Advertiser ID hashed with SHA1. Requires ad network support



Device mac address. Requires ad network support



Device mac address hashed with SHA1. Requires ad network support


All parameters are available in the Installation Report and the Analytics, Reports and APIs.

Why is PID (Publisher ID) the Most Important Parameter?

Among all available tracking link parameters PID stands out as the only parameter that MUST be included in every tracking link. 

PID, Publisher ID, is actually the Media Source name. This is the primary field for attributing the install to its source.  

Each one of AppsFlyer's Integrated Partners has its own unique PID value, which ends with "_int". When using Custom Tracking 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 These Common PID Issues

Consider the following PID rules when using this parameter:

1. Always include PID in your tracking links

Without the PID on the tracking link the user is automatically attributed to a "None" media source and the original installation source is gone.

2. For Custom Sources Use NON-Integrated Partner PIDs 
For each integrated source use only the designated PID for correct attribution of its installs. For any custom media source, such as email, SMS or even viral unpaid posts on Facebook use other, non-integrated PID values.
3. Use only legal characters
If the PID parameter in the Tracking Link contains one of the following characters ":<>*&?/" - the click/install appears in the dashboard under invalid_media_source_name.


Avoid using white spaces in the PID value, or make sure to URL encode your tracking 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 tracking 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:

  1. Media source (pid=)
  2. campaign name (c=) 
  3. Ad set (af_adset=)
  4. Ad name (af_ad=) 


The following tracking links uses 4 levels of granularity to track the "cashmere" ad in the "coats" ad set in the "winter" campaign running on the integrated "networkx" media source.


Is AppsFlyer's Tracking Link Dynamic or Static?

AppsFlyer's tracking links are not trackers, and could either be dynamic or static.
How can you tell if a link is dynamic or static?
If the tracking link contains parameters, it's a long pre-defined tracking link, and therefore static.
Only shortened URLs, used for custom tracking links, are dynamic.
This means that once you start using a tracking 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 tracking 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 a tracking link:


This is because the tracking link includes a # character. For example:

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?

The Subscriber Parameters, i.e. af_sub1 through af_sub5 can be used to track any useful KPIs. These parameters get parsed and appear in the raw data report, which makes them very handy for performing data aggregation or filtering.


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 tracking 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?

AppsFlyer limits the campaign name length in the tracking link URL to 60 characters. If the character limit is exceeded, the campaign name is changed to the following string: c_name_exceeded_max_length
Was this article helpful?
3 out of 4 found this helpful