Skip to main content
Appsflyer - Advanced Privacy Integration

This article lists the integration settings for Advanced Privacy on Appsflyer

Updated over 8 months ago

Introduction

The increased privacy solutions developed by Apple in iOS 14 make attribution on the user-level impossible. According to Apple's policy, identifying a user for attribution purposes is prohibited for all platforms unless the user gives permission for the same. As per Apple's policy, if the user does not authorize tracking, then no identifier from the User's device can be used to identify the user, including IDFA, click ids which are usually the primary methods of attribution.

AppsFlyer's solution to the recent iOS 14.5 changes consists of a framework called Advanced Privacy Integration. This framework allows advertisers to granularly control the information that is collected from the user and the information that is shared with ad networks.

To have access to all attribution methods that the Appsflyer's AP framework supports, you will need to ensure the following standards are followed. It is also good to keep an eye on the documentation in the next weeks to make sure you implement any needed AF changes in a timely manner. We will also keep you updated on our regular communication channels.

Tracking Links

When no authorization is available from the user running iOS 14.5+, the tracking links need to contain the following parameters:

  • af_ua - the user agent of the user that clicked

  • af_ip - the ip of the user that clicked

  • af_lang - the language fo the user that clicked as defined in the HTTP Headers

The following Swaarm macros can be used to pass the above-required information to Appsflyer.

Macro Name

Description

Example

{user.ip}

IP of the user device. (Needs to be passed by the publisher in the parameter user_ip for S2S tracking)

102.109.100.2

{user.encoded_ua}

URL-encoded user agent string. (Needs to be passed by the publisher in the parameter user_ua for S2S tracking)

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1

{user.language}

Language of the user device. (Needs to be passed by the publisher in the parameter user_language for S2S tracking)

EN

Furthermore, to allow for PEA attribution in addition to regular attribution, it is best to also send the PEA chain macro in a parameter that your advertiser can send back in a postback. We generally recommend using the af_ad parameter. The {pea.chain} macro is generated automatically by Swaarm to contain all the needed information to identify the traffic source.

💡AppsFlyer Attribution Link

Please note: Total URL length must not exceed 2000 characters.

Sample Appsflyer click tracking link

https://app.appsflyer.com/com.testapp?pid=Media_int&af_enc_data={offer.weGet}&af_ip={user.ip}&af_lang={user.language}&af_ua={user.encoded_ua}&af_siteid={publisher.id}&af_sub_siteid={publisher.subId}&c={offer.name}&af_c_id={offerId}&af_ad={publisher.creative}&af_adset={pea.chain}&clickid={id}&advertising_id={device.ids.gaid}&idfa={device.ids.idfa}

In this example, we have used the af_adset parameter to pass the {pea.chain} information, but the af_sub_siteid or the af_ad parameters can also be used for the same depending on the advertiser's requirement.

Postback Links

It is important to also add your Privacy enabled postback links in Appsflyer for the AP framework. Keep in mind that the regular click-id-based one should still stay in place, otherwise you can lose important postbacks.

The only mandatory parameter that we require AF to fill in is the pea_chain parameter. You should fill it with a macro corresponding to the parameter you used in the click. Again we recommend using af_adset/{Adset} combo for this, but any other parameter/macro combination can be used as well.

Sample Appsflyer Advanced Privacy postback

Install postback for Android / IOS

https://track.yournetwork.swaarm-clients.com/postback?publisher_sub_id={Sub site ID}&country={Country code}&install_finish_time={Install timestamp}&click_timestamp={Click timestamp}&pea_chain={Adset}&conversion_timestamp={Timestamp}&postback_id={Postback ID}&os_name={Platform}&sale_amount={Event revenue USD}&rejected_reason_value={Blocked reason value}&rejection_reason={Blocked reason}

In-App event postback for Android / IOS

https://track.yournetwork.swaarm-clients.com/postback?publisher_sub_id={Sub site ID}&country={Country code}&install_finish_time={Install timestamp}&click_timestamp={Click timestamp}&pea_chain={Adset}&conversion_timestamp={Timestamp}&postback_id={Postback ID}&os_name={Platform}&sale_amount={Event revenue USD}&event_id={Event name}&rejected_reason_value={Blocked reason value}&rejection_reason={Blocked reason}

Alternatively, you can also use the capture below as a template to set the Advanced privacy postback on the Appslfyer platform.


Publisher Tracking Changes

To ensure the attribution information is properly forwarded to your publishers, the following changes should be ensured on offers that have limited attribution from AF.

Click Tracking link for publishers

The click tracking links of your publishers need to be slightly adjusted to include campaign/traffic source information that can be sent back to them on attribution

For Affise Publishers

Affise generally requires their offer id and publisher id in their postbacks so we will need to first include it in the click by using:

  • ext_offer_id - the offer id of your publisher in their platform

  • ext_publisher_id - the if of the publisher of your publisher in their platform

http://yournetwork.trckswrm.com?offer_id=123&pub_id=23&ext_offer_id=YOUR_OFFER_ID&ext_pub_id=YOUR_PUBLISHER_ID

For Swaarm Publishers

Swaarm partners benefit from the PEA chain attribution which guarantees complete attribution no matter the length of the network chain. Your swaarm publishers will need to include in their tracking links: pea_chain={pea.chain}

http://yournetwork.trckswrm.com?offer_id=123&pub_id=23&pea_chain={pea.chain}

Postback link for your publishers

Of course, the postback links will also need to be adjusted to ensure the needed attribution information is correctly forwarded. In both cases, the important thing is to forward the click parameters that were supplied using the postback macros.

It is important to note that this postback link should be added in addition to any existing ones. Replacing the existing ones will lead to lost postbacks for your publishers.

For Affise Publishers

https://theirdomain.affise.com/probattribution?action_id=#{id}&goal=#{eventType.advertiserEventTypeId}&offer_id=#{ext.offerId}&pid=#{ext.publisherId}

For Swaarm Publishers

https://theirdomain.swaarm-clients.com/postback?postback_id=#{id}&event_id=#{eventType.advertiserEventTypeId}&pea_chain=#{peaChain}

Did this answer your question?