Advanced Privacy guide & postback macros for ad networks

At a glance: Data sharing with partners when Advanced Privacy is enabled. Instructions for ad networks on setting up Advanced Privacy postbacks. Note! This article is not related to either SKAdNetwork postbacks nor is it intended for use by advertisers. 

Advanced Privacy for Ad Networks news

The Advanced Privacy postback mechanism described in this article works when all of the following are true:

  • The user device is running iOS 14.5+
  • Advanced Privacy is on

AdvancedPrivacy.png

This article discusses: 

Ad network Advanced Privacy data-sharing principles

Starting with iOS 14.5+ the AppsFlyer Aggregated Advanced Privacy Framework (AAP) provides advertisers with the ability to control the availability of user-level attribution data provided via the AppsFlyer platform. 

In the context of ad networks, the AAP framework is implemented using Advanced Privacy (AP). For ease of understanding, the terms Advanced Privacy and AP are used interchangeably in this article. 

AP doesn't impact the availability of aggregated data available to partners or ad networks.  

What data is affected by AP

When AP is on, user-level data for non-consenting users running iOS 14.5+ is not available via postbacks or other reporting methods including Protect360 fraud-related reports.

In the context of postbacks it means that different types of postbacks are used depending on a user's ATT consent status and other factors. 

You can view the current AP setting, per app, in the AppsFlyer dashboard. Go to, Configuration > Integrated Partners > select your ad network > Integration tab. The default setting is on. 

APforPartners2.png

The postback types required for Advanced Privacy integration are:

  • Regular: Your existing integration template with AppsFlyer. Contains user-identifier and attribution-data macros.
  • Advanced Privacy: Template without user-identifier macros. If an AP postback is required and you haven't completed AP integration, no postback is sent. You can set up AP integration using our self-service Postback Management tool.

Note! If a user gives ATT consent in the apps of both the advertiser and the publisher ("dual consent"), regular postbacks are used.

Type of postback used 

The following table is applicable to the data of users running iOS 14.5+.

Note! If a user's iOS version is 14.4 or earlier, this table is not applicable and regular postbacks are sent. 

AP status

ATT status Postback template type to attributed partner* supporting AP  Postback template type to attributed partner* not-supporting AP   Unattributed postback partner*

流量方App

广告主 App

启用

已授权

Not authorized

AP template

No postback

None

启用

Not authorized

已授权

AP template

No postback

Regular template. Attribution fields aren't available.*

启用

已授权

已授权

Regular template. This includes available IDs like: IDFA, IDFV, CUID, Click ID and attribution fields. 

Regular template. This includes available IDs like: IDFA, IDFV, CUID, Click ID and attribution fields.  Regular template including available IDs. Attribution fields aren't available.*

启用

Not authorized

Not authorized

AP template

No postback

None

停用

Not considered

Not considered

常规模式

常规模式

Regular template. Attribution fields aren't available.*

Postback type for iOS 14.5+

(*) Principles for data sharing with partners

For any given event, multiple ad network partners may be entitled to a postback. The postbacks sent are as follows:

  • Attributed partner: Ad network credited with the event
  • Unattributed partner: Integrated partner not credited with the event, when the In-app events postback > Sending option is set to All media sources including organic. If the advertiser app has ATT consent, the postback contains user IDs without attributed data. (This option is not supported by all ad networks.)

    InAppEventAll.png

Web campaigns

AP behaves differently when the ad network serves an ad on the web.

To indicate whether a click came from the web or from an app, you must send the af_media_type=web or af_media_type=app parameter in the click URL.

If you don't send af_media_type, the default is app.

ATT status Postback type to attributed partner* Postback type to unattributed partner*

流量方App

广告主 App

不适用

Not authorized

高级隐私模式

None

不适用

已授权

Regular. User-level with the following IDs: IDFA, IDFV, CUID, Click ID.

Regular. User-level IDs only.

Postback type used for iOS 14.5+ when AP is on

对接

Update your click URLs and complete Advanced Privacy integration.

Click URL requirements

In many cases, depending on user ATT consent, IDFA will be unavailable in the publisher app, the advertiser app, or both. In these instances, AppsFlyer may perform attribution using Aggregated Advanced Privacy and probabilistic modeling.

[Best practice] To maximize your attributions, send all parameters listed.

  1. Append the following parameters to click URLs:
    Identifier 点击参数

    示例

    广告系列活动

    c

    US_20_30

    广告系列活动ID

    af_c_id

    12345

    广告组

    af_adset

    ADSET_1

    广告组ID

    af_adset_id

    56789

    Ad 

    af_ad

    creative_name

    广告ID

    af_ad_id

    34567

    子渠道 ID

    af_siteid

    abcdefgh12345678

    Sub site ID

    af_sub_siteid

    abcdefgh12345678

    渠道

    af_channel

    channel_name

    广告类型

    af_ad_type

    视频

    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.

    添加广告系列信息:

    The example that follows shows how 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 click URLs*:

    注意

    如果您的点击请求未添加必填参数,您将无法获得大部分的激活归因。

    • IP 
    • User-agent 

    * No action is required when sending a click using a simple HTTP referrer that redirects to AppsFlyer. 

    Use the extraction method described to append the parameters to the click URL when using either of the following methods: 

    • 点击请求通过In-app流量跳转
    • Server-to-server clicks (aka, S2S) 

    参数

    强制性的内容

    提取方法

    设备语言和区域设置

    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
    • 确保提取不是CFNetwork 的用户代理。
    • user-agent值应使用URL-encoded方式处理。

    设备IP地址

    af_ip

    最佳选择:如果可用,请使用af_ip参数提供设备IP。

    次优选择:如果可用,AppsFlyer将使用X-Forwarded-For中IP(存在于代理服务器请求客户端最原始的IP地址的HTTP请求header)

     Parameters for Advanced Privacy attribution

    添加参数至点击链接

    To pass these mandatory parameters 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}

    示例

    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.

    通过click URL headers传递数据

    通过click URL headers传递数据,请参考以下:

    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 specification

To receive Advanced Privacy postbacks, you must set up an Advanced Privacy integration in addition to the regular postback integration. You can configure the Advanced Privacy postback yourself in the AppsFlyer dashboard.

Differences between the regular template and Advanced Privacy template

  • Postbacks are sent in hourly batches.
    • The batches include all event types.
    • 0.001% of postbacks may be sent in later batches, with possible delays of up to 24 hours.
  • 回调时间和事件实际发生之间不直接相关联
  • 时间戳宏:
    • 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 reported using the UTC time zone. Example timestamp: (2020-07-20 20:00:00)
  • The following parameters are not available in Advanced Privacy postbacks: Click ID, Customer User ID, AppsFlyer ID, IDFA, IDFV, device model, OS version, carrier.

联系AppsFlyer进行对接的步骤:

  1. Set up your Advanced Privacy postback in the AppsFlyer dashboard. 
  2. Test Advanced Privacy integration.
回调类型
激活
应用内
Advanced Privacy postback endpoint [complete as required]

回传宏(名称)

备注 回调基础参数 应用内事件可选参数 被拒绝归因的可选参数
af_ad 广告素材名称    
af_ad_id 34567    
af_ad_type 例如:banner,footer,video    
af_adset ADSET_1    
af_adset_id 56789    
app_id -    
app_name -    
attributed_touch_hour

会近似取最近的小时。

格式参考note(1)

   
attributed_touch_type Such as: click, impression    
blocked_reason 适用于Validation Rules/Protect360    
blocked_reason_value 适用于Validation Rules/Protect360    
blocked_sub_reason 适用于Validation Rules/Protect360    
bundle_id 由广告主设置    
c 广告系列名称, 如, US_20_30    
af_c_id 广告系列 ID, like, 12345    
af_channel 渠道名称    
country_code 转化时记录的ISO国家码    
event_hour

会近似取最近的小时。

格式参考note(1)

   
event_name 由广告主上报    
event_revenue 事件中包含的收入金额    
event_revenue_
currency
收入金额的货币码    
event_revenue_usd 收入金额换算成USD    
install_hour

会近似取最近的小时。

格式参考note(1)

   
is_first 如果是具体用户所触发的首次事件,则为true    
is_primary

用于去重

Boolean: 0, 1

   
is_retargeting

用于去重

格式参考note(2)

   
is_reengagement

格式参考note(2)

   
is_reattribution

用于去重

格式参考note(2)

   
match_type 如: id_matching, probabilistic    
event_id 广告平台所接受的对应事件的事件名称或ID    
platform 如: ios, Android    
postback_id 具有唯一性的postback_id    
retargeting_
conversion_type
Such as: re-engagement, re-attribution    
af_siteid abcdefgh12345678    
af_sub_siteid abcdefgh12345678    

注释:

支持以下时间戳格式:

  • [Default] String: YYYY-MM-DD HH:MM:SS
  • Epoch time: 10-digit Unix timestamp 

支持以下Boolean格式:

  • [默认] Numeric: 0, 1 
  • String: false, true
高级隐私保护归因可用参数

Setting up your Advanced Privacy postback

Set up your AP postback using the Postback management option in the AppsFlyer dashboard.

Prerequisites:

  • You must have an active integration with AppsFlyer to manage your Advanced Privacy postback. Contact integrations@appsflyer.com to create an integration.
  • AppsFlyerAdmin_us-en.png Postback management is performed by the account admin; team members do not have access.

To set up the postback:

  1. Click the top-right drop-down menu > Postback management.
  2. Select the postback type: Advanced Privacy. 
  3. Activate the builder.

    postback-management-enter-endpoint_en-us.png

  4. Enter the endpoint address: The endpoint URL to which AppsFlyer sends postbacks. Enter the relevant URLs for installs and/or in-app events.
  5. Enter the parameters to be included in the postbacks:
    • Parameter name: AppsFlyer parameter screen name
    • Your receiving parameter: the respective receiving parameter on your side
    • Parameter value (available for some parameters): choose the value format. For example, for Boolean values, choose whether to receive them as "true"/"false", or 1/0.
    • Install: check the box to include the parameter in the install postback.
    • In-app event: check the box to include the parameter in the in-app event postback.

    postback-management-parameters_en-us.png

    Complete list of Advanced Privacy postback macros.

  6. [Optional] Add custom parameters that are not provided by AppsFlyer:

    postback-management-custom-parameters_en-us.png

  7. Check the final postback template preview to make sure everything is correct.

    postback-management-template_en-us.png

  8. Click Save. Note that when you save the postback, the changes take effect immediately.

In the case of any issues, reach out to integrations@appsflyer.com.

附加信息

AP for analytics partners

Postbacks are sent to analytics partners as follows:

  • AP off: User-level postback without restriction.
  • AP on: According to user source and ATT status as detailed in this table; 

User source

ATT status Postback type to analytics partner

流量方App

 Advertiser app

Non-organic 


 


 

已授权

已授权

常规模式

Not authorized

已授权

None

Any value

Not authorized

None

Organic or web

不适用

已授权

常规模式

Organic or web

不适用

Not authorized

None
Analytics partner postback type according to ATT status and user source

AP vs. SKAdNetwork

SKAdNetwork is an attribution technology provided by Apple for iOS devices. Advanced Privacy is part of the AppsFlyer Aggregated Advanced Privacy (AAP) framework and relates to attribution performed by AppsFlyer. AAP provides advertisers the ability to control the availability of user-level attribution data via the AppsFlyer platform. Typically ad networks support both AP and SKAdNewtork integration. 

这篇文章有帮助吗?