SKAdNetwork 移动集成
概述
Using Branch to manage your Advertiser SKAdNetwork integration and display SKAdNetwork data in Branch, requires updating the Branch dashboard and updating your iOS app in one of two ways:
- OPTION 1 - Use the Branch SDK to manage all calls to SKAdNetwork
- OPTION 2 - Integrate directly with SKAdNetwork to fully control what's sent to Apple
Which SKAdNetwork implementation option is better for you?
To learn more about the advantages of each integration approach, please read this FAQ item.
服务器间 (server-to-server) 以及 TUNE SDK 集成
Any mobile app that uses a server-to-server integration, uses the TUNE SDK, or uses any other integration solution/kit that doesn't contain the Branch SDK directly must use OPTION 2 or leverage another 3rd party SDK to send events to SKAdNetwork
先决条件
- App is registered in the Branch dashboard
- Account is enabled with Branch Universal Ads
- App is available in the Apple App Store
- Network & publishers support SKAdNetwork and pass attribution data to Branch.
操作后台 (Dashboard) 设置
1. Authenticate & Integrate with Apple SKAdNetwork
可能需要开发者
验证应用需要访问 Apple 的开发人员工具 App Store Connect,因为 Branch 需要多个 ID 和一个 key 才能完成身份验证并将正确的应用同步到您的 Branch 帐户。
- Issuer ID
- Key ID
- Private Key - learn how to generate a Private Key
要配置 SKAdNetwork 功能,您需要:
- 在左侧导航栏中的渠道和链接项下,点击广告。
- 在广告子菜单中,点击 SKAdNetwork。
- 在 SkAdNetwork 页面上,点击配置选项卡。
- 在身份验证选项卡上,请提供以下 App Store Connect 信息:
a. 发行者 ID
b.密钥 ID
c.私人密钥
-选择"Admin"或"App Manager"访问级 - 点击Save & Continue。


- 一旦您的 App Store Connect 帐户通过身份验证(用绿色的对号标记),请确认已同步正确的应用,然后点击集成。


App Store Connect 凭证
App Store Connect 凭证用于一次性检查以确认 App 所有权。在“App Integration(应用集成)”步骤完成后,可移除这些凭证(“应用集成”旁出现绿色复选标记)。选择“Reset App Store Credentials(重置 App Store 凭证)”可将凭证删除。只要完成了“应用集成”步骤,SKAdNetwork 集成即已完成且有效。
2.选择加入 Branch SDK 支持
In the SKAdNetwork Config section of the Branch dashboard, select the YES
radio button to have the Branch SDK handle all calls to SKAdNetwork.
如果您有如下计划,请不要选择加入:
- Integrate directly with SKAdNetwork and call the SKAdNetwork functions natively.
- Use another 3rd party library to handle your app's interactions with SKAdNetwork. Ex. Segment SDK
Note for Segment SDK Clients
Segment does not support SKAdNetwork conversion tracking so to see conversion events in Branch you need to do one of the following:
- Tracking this event by the Branch SDK OR
- Manually implement
updateConversionValue
method inside the app for events tracked by Segment


3.为事件分配转化值
- In the
SKAdNetwork Config
section of the Branch dashboard, select all app events you want Branch use for triggering SKAdNetwork conversion value updates. - You may optionally select a Customer Event Alias and/or a Revenue Range to further distinguish the conversion value.
- Assign unique values to each event (SKAdNetwork accepts any number from 1 to 63, with 0 reserved by the system for the initial install) that represent their level of importance to you, where 63 is the highest priority and 0 is the lowest priority. SKAdNetwork will always use the event with the highest priority, regardless if an event with a lower priority was tracked afterward.


Revenue Range Guidance
- Revenue range is available for all Commerce Events where revenue is available on the event (Purchase, Add to Cart, Add to Wishlist, View Cart, Initiate Purchase, Add Payment Info, Click Ad, View Ad, Reserve, Spend Credits).
- Revenue must be entered as USD on the dashboard. Branch will convert revenue with different currencies on events to USD.
- Revenue ranges must not overlap for the same event (Ex: 1-100, 50-150).
- Lower Bound Revenue is inclusive, Upper Bound Revenue is exclusive.
- It is necessary to include both a lower + upper bound on every event.
APP 选项 1: 使用 Branch SDK 管理 SKAdNetwork
支持的平台
The Branch SDK versions below automatically handle SKAdNetwork in-app functionality. If you do not integrate Branch in the platforms below, please integrate directly with SKAdNetwork instead.
- iOS v0.35
- React Native v.5.0.0
- mParticle iOS v.8.0.0
- Adobe Launch iOS v.1.3.0
- Cordova v.4.2.0
- Capacitor v.2.0.0
- Xamarin v.7.0.6
- Unity v.0.6.6
- Flutter v.1.1.0
集成步骤
- 将 Branch SDK 更新到支持 SKAdNetwork 的版本
- Import Apple's StoreKit framework into your iOS build


- Confirm the Branch SDK initializes when the app opens. If the SDK is not initializing, have your mobile developer complete the basic Branch mobile integration. Behind the scenes, the Branch SDK will call registerAppForAdNetworkAttribution to ensure SKAdNetwork considers the install for attribution.
- Confirm app events are tracked by the Branch SDK. If you want to add new conversion events, you will need to update the app to track those events with the Branch SDK.
更改转化值
Whenever the Branch SDK tracks an event, it will call updateConversionValue and use the values mapped in the Branch dashboard. If you change the values in the dashboard, the Branch SDK will start using those new values instead.
更改 SKAdNetwork 标注的时间窗口
By default, Branch limits
updateConversionValue()
calls to SKAdNetwork to within 24 hours after first install. Every timeupdateConversionValue()
is called with a value greater than previous, this delays SKAdNetwork's attribution of the original Install event by a rolling 24 hour timer.但是,您可以使用以下 SDK 方法修改此时间窗口:
- Branch.getInstance().setSKAdNetworkCalloutMaxTimeSinceInstall(3600.0 * 24.0)
Facebook - 广告投放优化要求
Facebook 广告投放优化要求 SKAdNetwork 窗口的延迟不得超过 24 小时。我们的 SDK 默认支持24小时窗口。
追踪 SKAdNetwork 和 Branch SDK 之间的不同事件
Based on your SKAdNetwork strategy, it may not always make sense to have the Branch SDK automate the SKAdNetwork in-app integration. Because of SKAdNetwork's restrictions on conversion values (63 total values, no metadata, etc.), using the existing events you track with the Branch SDK may not be as effective as tracking custom values by integrating directly with SKAdNetwork. For example, if revenue is your most important metric, you can use conversion values to represent differences in revenue "basket size".
APP 选项 2: 直接与 SKAdNetwork 集成
如果您希望直接管理 SKAdNetwork,而不是通过 Branch SDK,则可以使用这一方式。
集成步骤
- Opt-out from having the Branch SDK manage SKAdNetwork in the dashboard setup, and complete the remainder of the dashboard setup
- Import Apple's StoreKit framework into your iOS build


- The first time the app opens (i.e., your "Install" session), call registerAppForAdNetworkAttribution() from the SKAdNetwork class
registerAppForAdNetworkAttribution() 只需调用一次
Subsequent calls to this method have no effect.
报告转化
- Call updateConversionValue() from SKAdNetwork for every app event you want to send to Apple, and use the same values for each event in the Branch dashboard.
- 安装 24 个小时后,停止调用 updateConversionValue(),与 Branch 的追踪方法保持一致。每次调用 updateConversionValue() 且数值大于前一个值时,Apple 的原始安装事件归因会以 24 小时为基础成倍延迟。
更新 updateConversionValue() 中的值
如果您更改某一事件的转化值,将会存在过渡期,在此期间,应用最新版本的用户将使用新值报告转化,而旧版本的应用将继续使用旧值报告转化(直到他们完成应用更新)。
Please also remember to update the values mapped in the Branch dashboard, to ensure reporting is aligned in Branch.
Apple 没有提供可以报告转化的服务器端 API
SKAdNetwork prevents the ability to connect users to conversions, so integrations that track events server-side must still tell the app to report the conversion to SKAdNetwork. Because the first conversion must occur within 24 hours of install, there will be a chance the event is tracked server-side but the user does not re-open the app within the 24 hour window for it to be reported to Apple.
为了缓解这一风险,始终追踪通常会导致服务器端事件的一系列应用内事件(例如 "add-to-cart" 通常是 "purchase" 之前发生的事件)。他们不能代替您的服务器端事件,但是可以作为评估广告 campaign 表现时的有效代理;而且还可以延迟 Apple 的 24 小时定时器,以提高在追踪服务器端事件后的时间内用户重新打开应用的概率。
问题排查常见问题解答
Updated about 2 months ago