Data sharing postback options for iOS 14
- How the selected data sharing mode selected by advertisers impacts data availability
- How to structure your click URL to be eligible for attribution
- Important changes to postback parameters
Data sharing options
In order to adapt to iOS 14, AppsFlyer offers advertisers the choice to work with partners, ad networks, and analytics partners, by selecting data sharing options in the partner configuration page of the advertiser dashboard.
- Advanced Privacy
- Advanced Privacy is designed to maximize end-user privacy and to help advertisers comply with Apple iOS 14 updated privacy controls.
- Attribution data is stripped of identifiers. Postbacks are available on an aggregated level only. The sole exception is when AppTrackingTransparency (ATT) consent is granted by a user in both the advertiser and publisher apps, in which case identifiers will be shared in postbacks.
- [Default] Regular mode: Some advertisers might opt to work with partners in regular mode, in which case, identifiers are shared with partners if available.
The following lists the data available to partners via postback in each of the possible ATT scenarios, based on the advertiser’s data sharing selection.
Data sharing selection | ATT consent status | IDs included in the postback | Postback type | |
---|---|---|---|---|
Publisher app |
Advertiser app |
|||
Advanced Privacy (on) |
Agreed |
Declined |
None |
Advanced |
Declined |
Agreed |
None |
Advanced |
|
Agreed |
Agreed |
IDFA, IDFV, CUID, Click ID |
Regular |
|
Declined |
Declined |
None |
Advanced |
|
Regular |
Agreed |
Declined |
IDFV, CUID, Click ID |
Regular |
Declined |
Agreed |
IDFA, IDFV, CUID, Click ID |
Regular |
|
Agreed |
Agreed |
IDFA, IDFV, CUID, Click ID |
Regular |
|
Declined |
Declined |
IDFV, CUID, Click ID |
Regular |
Click URL
In the majority of cases, IDFA will be unavailable in the publisher app, the advertiser app, or both. In those scenarios, AppsFlyer will perform attribution using probabilistic modeling.
[Best practice] Send us all parameters listed in this section, to maximize your attributions, irrespective of if the advertiser works with Advanced Privacy or in regular mode.
- Append the following parameters to your click URLs.
Identifier Click parameter Example
Campaign
c
US_20_30
Campaign ID
af_c_id
12345
Adset
af_adset
ADSET_1
Adset ID
af_adset_id
56789
Ad
af_ad
creative_name
Ad ID
af_ad_id
34567
Site ID
af_siteid
abcdefgh12345678
Subsite ID
af_sub_siteid
abcdefgh12345678
Channel
af_channel
channel_name
Ad type
af_ad_type
video
iOS device model*
af_model
The device model. Values permitted:
- iphone (all lower case)
- ipad (all lower case)
Operating system*
af_os
The operating system version
* Some information may also be provided via the user agent. In this case, the value sent using the specific identifier takes precedence.
Append campaign details to the click URLUse the example that follows to add your campaign details to the click URL.
https://app.appsflyer.com/id123456789?pid=YOUR_NETWORK_ID&c={CampaignName}&af_c_id={CampaignID}&af_adset={adset name}&af_adset_id={adset ID}&af_ad={ad name}&af_ad_id={ad ID}&af_ad_type={Ad type}&af_siteid={PublisherId}
- Add the following mandatory parameters to each click URL*.
Caution
If your click URL does not pass the mandatory parameters, you will not be credited with the majority of installs you drive.
- IP
- User-agent
- Language
* No action is required when sending a Click using a simple HTTP referrer that redirects to AppsFlyer.
Use the extraction method below when you use any of the options listed, and append the parameters to the click URL.
- Redirect via in-app
- Server-to-server clicks (aka S2S)
Parameter
Extraction method
Device language and locale
af_lang
NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
[Recommended] Provide the language and locale; for Example, en-US.
User-agent
af_ua
Extract the user agent with the format:
Mozilla%2F5.0+%28iPhone%3B+CPU+iPhone+OS+13_3_1+like+Mac+OS+X%29 +AppleWebKit%2F605.1.15+%28KHTML%2C+like+Gecko%29+Mobile%2F15E148
- Do not extract the CFNetwork user-agent, extract the other one.
- The user-agent should be URL encoded.
Device IP address
af_ip
Best option: If available, provide the device IP under the af_ip parameter.
Next option: If available, AppsFlyer will use the IP in X-Forwarded-For.
Mandatory parameters required for Advanced Privacy attribution
Append parameters to the click URLTo pass the information described above on the click attribution link, use this reference:
https://app.appsflyer.com/id123456789?pid=YOUR_NETWORK_ID&c={CampaignName}&af_c_id={CampaignID}&af_adset={adset name}&af_adset_id={adset ID}&af_ad={ad name}&af_ad_id={ad ID}&af_ad_type={Ad-type}&af_siteid={PublisherId}&af_ua={USER-AGENT}&af_lang={LANGUAGE}&af_ip={IP}
Example
GET https://app.appsflyer.com/id123456789?pid=YOUR_NETWORK_ID&c={CampaignName}&af_c_id={CampaignID}&af_adset={adset name}&af_adset_id={adset ID}&af_ad={ad name}&af_ad_id={ad ID}
&af_ad_type={Ad type}&af_siteid={PublisherId}&af_ua=Mozilla%2F5.0%20%28iPhone%3B%20CPU%20iPhone%20OS%2012_1_4%20
like%20Mac%20OS%20X%29%20AppleWebKit%2F605.1.15%20%
28KHTML%2C%20like%20Gecko%29%20Mobile%2F16D57&af_lang=en-US&af_ip=11.11.1.11
* Query parameters must be URL-encoded.
Pass data on click URL headers
To pass the fields on the click URL header, use this reference:
GET https://app.appsflyer.com/id123456789?pid=YOUR_NETWORK_ID&c={CampaignName}&af_c_id={CampaignID}&af_adset={adset name}&af_adset_id={adset ID}&af_ad={ad name}&af_ad_id={ad ID}&af_ad_type={Ad type}&af_siteid={PublisherId}
accept-language: en-US,en;q=0.
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X)
AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
X-Forwarded-For: 11.11.1.11, 222.222.2.222
Advanced Privacy postback
If advertisers choose to share data using Advanced Privacy, postbacks will not contain identifiers unless ATT consent is granted in both the publisher and advertiser apps (dual consent). Without dual consent, only the campaign details sent on the click URL will be returned in the postback. This postback type is referred to as an Advanced Privacy attribution postback.
For the purpose of clarity, this new postback template is in addition to your existing postback template. It does not replace the existing template. Depending on the advertiser's data sharing choice and the ATT consent status, the applicable postback template will be used.
Format changes to postbacks
- Postback time does not correlate with actual event times.
- Timestamp macros:
- for installs and in-app events, timestamps are rounded down to the hour in which they occurred. For example, 22:55:30 is reported as 22:00:00
- are according to the UTC time zone. Example timestamp: (2020-07-20 20:00:00)
- The following parameters are not shared in Advanced Privacy postbacks: Click ID, customer user ID, AppsFlyer ID, IDFA, IDFV, device model, OS version, carrier.
Action required by the ad network to integrate:
- You must notify us and we must verify your Advanced Privacy postback integration.
- To do so, email integrations@appsflyer.com with the following information:
- Endpoint for each postback type. Use the table that follows.
- List the base parameters that will be sent for all postbacks.
- List the optional parameters for in-app events and rejected attribution due to fraud or non-compliance with validation rules
- Test Advanced Privacy integration
Postback type |
---|
Install |
In-app |
Postback macro (name) |
Remarks | Base parameters for all postbacks | Optional parameters for in-app events | Optional parameters for rejected attribution |
---|---|---|---|---|
af_ad | Creative name | Yes | ||
af_ad_id | 34567 | Yes | ||
af_ad_type | Like: banner, footer, video | Yes | ||
af_adset | ADSET_1 | Yes | ||
af_adset_id | 56789 | Yes | ||
app_id | - | Yes | ||
app_name | - | Yes | ||
attributed_touch_hour |
Rounded down to the nearest hour. Format see note (1) |
Yes | ||
attributed_touch_type | Like: click, impression | Yes | ||
blocked_reason | Relates to validation rules/Protect360 | Yes | ||
blocked_reason_value | Relates to validation rules/Protect360 | Yes | ||
blocked_sub_reason | Relates to validation rules/Protect360 | Yes | ||
bundle_id | As set by the advertiser | Yes | ||
c | Campaign name, like, US_20_30 | Yes | ||
af_c_id | Campaign ID, like, 12345 | Yes | ||
af_channel | Channel name | Yes | ||
country_code | ISO country code recorded on conversion | Yes | ||
event_hour |
Rounded down to the nearest hour. Format see note (1) |
Yes | ||
event_name | As reported by the app | Yes | ||
event_revenue | Revenue amount in event currency | Yes | ||
event_revenue_ currency |
Revenue currency code | Yes | ||
event_revenue_usd | Revenue converted to USD | Yes | ||
install_hour |
Rounded down to the nearest hour. Format: see note (1) |
Yes | ||
is_first | True if this is the first time this in-app event was triggered by aspecific end-user | Yes | ||
is_primary |
Use to deduplicate Boolean: 0, 1 |
Yes | ||
is_retargeting |
Use to deduplicate Format: See note (2) |
Yes | ||
is_reengagement |
Format: See note (2) |
Yes | ||
is_reattribution |
Use to deduplicate Format: See note (2) |
Yes | ||
match_type | Like: id_matching, probabilistic | Yes | ||
event_id | Name/ID of the corresponding event in the ad network platform | Yes | ||
platform | Like: ios, Android | Yes | ||
postback_id | Unique postback ID | Yes | ||
retargeting_ conversion_type |
Like re-engagement, re-attribution | Yes | ||
af_siteid | abcdefgh12345678 | Yes | ||
af_sub_siteid | abcdefgh12345678 | Yes | ||
Notes: (1) Timestamp formats available:
(2) Boolean format available
|
Analytics partners
Advertisers are able to select Advanced Privacy data sharing with regards to analytics partners, as well as ad networks. Analytics partners, who want to integrate using Advanced Privacy data sharing, should reach out to their partner development manager.