iOS14 Advanced Privacy postback guide for ad networks

Due to a number of privacy changes in iOS 14, networks are required to update their integration in order to work with iOS app advertisers. This article details:

Integration modes

In order to adapt to iOS 14, AppsFlyer offers advertisers the choice to work with partners by selecting an integration mode [expected availability, November 2020] on the partner configuration page in the advertiser dashboard. 

  • Advanced Privacy mode
    • This mode 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.
  • 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 table explains the data available to partners via postback in each of the possible ATT scenarios, based on the advertiser’s selected integration mode.

Integration mode ATT consent status IDs included in the postback

Publisher app

Advertiser app

Advanced Privacy

Agreed

Declined

None

Declined

Agreed

None*

Agreed

Agreed

IDFA, IDFV, CUID, Click ID

Declined

Declined

None

Regular

Agreed

Declined

IDFV, CUID, Click ID

Declined

Agreed

IDFA, IDFV, CUID, Click ID

Agreed

Agreed

IDFA, IDFV, CUID, Click ID

Declined

Declined

IDFV, CUID, Click ID

*For partners that support send all events for the purpose of suppression lists, an additional postback will be sent in parallel containing the IDFA but not the media source.
Postback data available according to ATT consent status

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.

  1. Append the following campaign detail parameters to each of 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


    Append campaign details to the click URL

    Use 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}
  2. 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.

    Parameters required for aggregate attribution


    Append parameters to the click URL

    To 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

When an advertiser chooses to work integrate 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 chosen mode, 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 aggregated attribution postbacks: Click ID, customer user ID, AppsFlyer ID, IDFA, IDFV, device model, OS version, carrier.

Action required by the ad network to integrate:

  1.  You must notify us and we must verify your Advanced Privacy postback integration.
  2. 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
Postback type Your endpoint
Install  
In-app  
Rejected attribution  
Advanced Privacy postback endpoint

 

Postback parameter 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 yyyy-mm-dd hh:mm:ss 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 yyyy-mm-dd hh:mm:ss 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 yyyy-mm-dd hh:mm:ss 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   Yes  
is_retargeting Use to deduplicate 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    
Advanced Privacy attribution parameters available

 

Was this article helpful?