Tracking links are used in VK Ads campaigns to account for clicks and their correct attribution on the side of the tracking system.
A tracking link is a link that, when clicked, takes the user to the app store to install an app or, if the app is already installed, to open it.
All tracking links include specific domains and link tokens. In addition, the links also include parameters to collect additional campaign data, user engagement, and to redirect users to the app or app store.
Link structure
Example of a tracking link with values:
https://app.appsflyer.com/com.greatapp?pid=mail.ru_int&c=GreatCampaign&af_siteid=A1b1
General requirements for tracking links
- There should always be 3 mandatory parameters in the link:
- pid — Appsflyer partner ID
- c — campaign name
- af_siteid — the unique identifier of the publisher. In other words, the site or application on which the advertisement is displayed.
The other parameters from the current configuration are not mandatory and we consider them optional (optional).
- The pid parameter should always have the value mail.ru_int.
- Each reference parameter must have its own specific macro. Example below.
https://app.appsflyer.com/{APP_ID}?pid=mail.ru_int&c={{campaign_name}}&af_siteid={{site_id}}&af_c_id={{campaign_id}}&af_adset_id={{banner_id}}&af_click_lookback=30d&clickid={clickid}&sub1=&sub2={{gender}}&sub3={{age}}
- The reference should not have several of the same mandatory parameters with different values:
http://app.appsflyer.com/id774652325?af_prt=mobio&c=Mobio_Evolution_iOS_032014_5&af_sub4=87769&af_sub2=1527&af_sub3=5&pid=mail.ru_int&clickid={clickid}&pid=vk_int
The advertising system will not allow an ad banner to be saved if:
- a domain other than app.appsflyer.com is used
- all or some mandatory parameters are missing from the tracking link
- an invalid macro or value is specified for mandatory parameters
- mandatory parameters have a missing value or macro.
- there are several identical mandatory parameters in the tracking link
Requirements for mandatory reference parameters
The following special characters may not be used in all parameter names and values:
;, *, !, @, #, ?, $, ^, :, &, ~, `, =, +, ’, >, <, /, {, }, %
| Parameter | Restriction |
|---|---|
| pid |
|
| c |
|
| af_siteid |
|
Validation rules for tracking links for Android Apps using the Single dashboard setup
If you use the Single Dashboard setup in AppsFlyer, the tracking link for Android apps must include the af_r parameter, which contains a direct link to the app in the app store. This direct link must also be URL-encoded; otherwise, the dashboard will not accept it.
Example of a tracking link for Google Play:
https://app.appsflyer.com/com.miHoYo.GenshinImpact?pid=mail.ru_int&c={{ad_plan_name}}&af_siteid={{site_id}}&af_c_id={{ad_plan_id}}&af_adset={{ad_group_name}}&af_adset_id={{ad_group_id}}&af_ad={{banner_name}}&af_ad_id={{banner_id}}&af_click_lookback=7d&clickid={clickid}&sub1=&sub2={{gender}}&sub3={{age}}&af_r=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.miHoYo.GenshinImpact
In tracking links for apps distributed through RuStore, the af_r parameter must appear after the pid=mail.ru_int parameter-macro pair and before the c parameter.
Example of a tracking link for RuStore:
https://app.appsflyer.com/com.vegetables.happyfarm?pid=mail.ru_int&af_r=https%3A%2F%2Fwww.rustore.ru%2Fcatalog%2Fapp%2Fcom.vegetables.happyfarm&c={{campaign_name}}&af_siteid={{site_id}}&af_c_id={{campaign_id}}&af_adset_id={{banner_id}}&af_click_lookback=30d&clickid={clickid}&sub1=&sub2={{gender}}&sub3={{age}}
Validation rules for tracking links for Android Apps using the Dashboard per store setup
If you use the Dashboard per Store setup in AppsFlyer, the af_r parameter is not required in the tracking link for Android apps. However, the af_r parameter may be needed in some cases for apps distributed through RuStore. It must contain a direct link to the app in the RuStore app store. This direct link must be URL-encoded; otherwise, the dashboard will not accept it. The af_r parameter must also appear after the pid=mail.ru_int parameter-macro pair and before the c parameter.
Example of a tracking link for RuStore:
https://app.appsflyer.com/com.vegetables.happyfarm-Rustore?pid=mail.ru_int&af_r=https%3A%2F%2Fwww.rustore.ru%2Fcatalog%2Fapp%2Fcom.vegetables.happyfarm&c={{campaign_name}}&af_siteid={{site_id}}&af_c_id={{campaign_id}}&af_adset_id={{banner_id}}&af_click_lookback=30d&clickid={clickid}&sub1=&sub2={{gender}}&sub3={{age}}
If you access your AppsFlyer account through an agency account, make sure that the tracking link includes the af_prt parameter with the agency name as its value. This parameter is added automatically to tracking links generated by AppsFlyer.