筛选项

Enable SKAdNetwork via Native Framework

Easily integrate SKAdNetwork with Branch through Apple's Native Framework to easily map and rank SKAdNetwork conversion values.

概述

There is the option of implementing SKAdNetwork (SKAN) using Apple's Native Framework for your iOS app. With SKAN via Native Framework, you'll have in-depth control of the frequency of updating the conversion value and for which events.

For a comparison of the different implementations, view our guide here.

它是如何工作的?

  1. The user installs the app from a SKAN support ad network campaign.
  2. The app registers an app installation by calling registerAppForAdNetworkAttribution() or updatePostbackConversionValue(_:)
  3. Optionally, update a conversion value by calling updatePostbackConversionValue(_:)
  4. Optionally, specify a server URL in the Info.plist to receive a copy of the winning install-validation postback.

先决条件

In order to implement SKAdNetwork via the Branch SDK, you must have completed the following:

  1. Created a Branch Dashboard.
  2. Enabled Universal Ads for your Branch account.
  3. Implemented the latest version of the Branch iOS SDK into your mobile app.
  4. Your app is available in the Apple App Store
  5. Your network/publishers support SKAdNetwork and pass attribution data to Branch
    • Verify your ad network(s) here.

Enable SKAdNetwork Using the Branch SDK

1. Obtain Authentication Parameters

You will need to obtain several IDs and a key from your Apple App Store Connect:

  • Issuer ID
  • Key ID
  • Private Key

In the App Store Connect in Users and Access, find your Issuer ID and Key ID

To download your Private Key, follow Apple's guide here.

2. Authenticate App Store Connect

In the Branch Dashboard under Ads > SKAdnetwork, go to the Configuration tab. If you're already logged into the Branch Dashboard, you can also click here to go there directly.

Here, you'll submit your Issuer ID, Key ID, and Private Key that you obtained from Step 1.

Click Save & Continue

Verify Connected App

Once your App Store Connect account is authenticated (denoted by a green checkmark), please verify the correct app has been synced.

Click Integrate

📘

App Store Connect 凭证

App Store Connect credentials are used as a one-time check to verify app ownership. These credentials may be removed after the App Integration step is complete (green checkmark appears next to "App Integration"). Remove credentials by selecting "Reset App Store Credentials". The SKAdNetwork integration is complete and valid as long as the App Integration step is completed.

3. Opt-Out for SDK Support

Navigate to the SDK OPT-IN tab, and mark No for allowing Branch SDK to make the SKAdNetwork calls on your behalf.

4. Assign Conversion Values

While on the SDK OPT-IN tab and after you've opted out you will then see a table for which you can assign a fine/coarse conversion value to a specific Branch-tracked event.

Assign an event to a fine conversion value (SKAN accepts any number from 0 to 63 that represents their level of importance). SKAN will always use the event with the highest priority, regardless if an event with a lower priority was tracked afterward. For each fine conversion value set for an event, you should also sign a coarse conversion value of low, medium, or high.

👍

Fine & Coarse Conversion Values

A fine value is the fine-grained value of an event that is tied to a value from 0-63. In SKAN 4.0, this value is sent in the first postback for Tier 2 and 3 thresholds.

A coarse value indicates a broader signal of the level of priority that that conversion falls under (where the fine value is not eligible for use): low, medium, or high. This is only available for SKAN 4.0+ and is sent in the first postback for the Tier 1 threshold and in the second and third postbacks of Tier 1-3 thresholds.

For additional details on Postbacks and Tier thresholds, please visit Apple's documentation here.

Conversion Value细节
0The lowest priority conversion, reserved by the system to indicate the initial install.

Conversion value 0 can’t have a revenue range.
63The highest priority conversion

Revenue Range

Revenue range is available for all Commerce Events where revenue is available on the event:

  • 购买
  • 添加到购物车
  • Add to Wishlist
  • 查看购物车
  • 发起购买
  • 添加付款信息
  • 点击广告
  • 查看广告
  • 保留
  • 消费积分

📘

Revenue Range Tips

  • 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.

Locking Events

For SKAN 4.0+, the conversion value mapper also allows you to indicate which events are "locking" events - which means that when that event is detected, it will trigger the SKAN postback and “end” the current SKAN window.

Anchor Highest Value

For SKAN 4.0+, the conversion value mapper supports the ability to anchor to the highest value which means that Branch will guarantee that the highest value event in your mapping that a user completes will be the event sent to SKAN.

5. Call updatePostbackConversionValue

The first time the app opens (i.e. your INSTALL session), you need to call updatePostbackConversionValue(_:completionHandler:) to verify the first launch of your app, and on subsequent calls, updates the conversion value or calls a completion handler if the update fails.

6. Define Conversion Values

In your app, you need to define what each conversion value means for which events you want SKAdNetwork to be attributed. Branch will report the conversion value as it is received from the ad network.

24 hours after INSTALL, stop calling updatePostbackConversionValue() to align with Branch's tracking methodology. Every time updatePostbackConversionValue() is called with a value greater than the previous, this delays Apple's attribution of the original Install event by a rolling 24-hour timer.
- Note: If you change the conversion value for an event, there will be a transition period where users on the latest version of the app will report conversions with the new value, while users on older app versions will continue to report conversions with the older value (until they update their app).

📘

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 installation, 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.

To mitigate this risk, always track a series of events in-app that typically lead up to the server-side event (i.e., an "add-to-cart" is an event that typically occurs before a "purchase"). These don't replace your server-side event, but can serve as an effective proxy when evaluating ad campaign performance, and can also delay Apple's 24-hour timer to increase the chance of the user reopening the app in time after your server-side event is tracked.

7. Test SKAN Integration

👍

广告平台

When testing SKAN, you need to confirm that you have completed the following:

  • Verified your Ad Network supports SKAN
    • Ad Network forwards individual SKAN postbacks to Branch (otherwise Branch will not receive/display SKAN data)
    • SKAN 支持该广告平台中的 Campaign 类型
  • 在 SKAN Campaign 中使用追踪链接。
    • SKAN does not require tracking links; however, this will be needed to get engagement data (clicks/impressions) and run Predictive Modeling on those campaigns.

Test Conversion Values

You can verify whether the conversion values you've provided in the Branch Dashboard have been correctly set and the SDK is receiving them.

  1. Download a proxy tool such as Charles
  2. Enable SSL monitoring
    • Using Charles proxy, you need to follow their documentation to enable SSL monitoring
  3. 打开应用并触发与 conversion value 相关的事件。
    • For INSTALLs: Look for invoke_register_app
    • For Other Conversions: (Must be tied to a conversion value) Look for update_conversion_value
{
  "session_id" : "850166709486919576",
  "data" : "{\"+clicked_branch_link\":false,\"+is_first_session\":false}",
  "device_fingerprint_id" : "847563926187298061",
  "identity_id" : "850166709481620778",
  "invoke_register_app" : true,
  "link" : "https:\/\/3mnv.app.link?%24identity_id=850166709481620778"
}
{
  "branch_view_enabled" : false,
  "update_conversion_value" : 42
}

测试 Apple 回传

You can also verify whether events are properly being attributed through Apple Postbacks.

👍

SKAN 3.0 Data Availability

SKAN does not attribute conversions in real-time. When the app is installed, a 24-hour rolling timer begins, and only when that timer expires, can the install then be attributed after an additional 0-24 hours. Every time an additional conversion is reported with a conversion value greater than the previous value, the 24-hour rolling timer is reset and the install does not get attributed until that 24-hour timer is allowed to expire. Apple offers a developer profile, that can reduce the timers for testing from 24 hours to 5 minutes.

  1. Set up a test campaign with the participating ad network. Please note that your app will need to be in production and not in Testflight or any other testing platform.
  2. Download an Apple SKAdNework Testing Profile to decrease the time in which the postback is sent from a test device from 24 hours to 5-10 minutes.
    • See Apple docs here for instructions.
  3. 查看 Branch 中的 SKAdNetwork Analytics 操作后台 (Dashboard)以查看 SKAdNetwork 数据
    • To see data from a particular ad network navigate to the “Ad Networks” tab in the SKAdNetwork dashboard, and filter by the ad partner you were testing with.

Additionally, you can verify with your Ad Network the data that they are receiving proper postbacks for the SKAN campaigns.