SKAdNetwork
A class that validates advertisement-driven app installations.
Declaration
class SKAdNetworkOverview
The ad network API helps advertisers measure the success of ad campaigns while maintaining user privacy. The API involves three participants:
Ad networks that sign ads and receive install-validation postbacks after ads result in conversions
Source apps that display ads from the ad networks, or websites that display the ads in Safari
Advertised apps that update conversion values as people engage with the app
Ad networks register with Apple to get an ad network ID and to use the API. Developers configure their apps to accept attributable ads from ad networks, and to receive copies of winning postbacks. For information about setup, see Registering an ad network, Configuring a source app, and Configuring an advertised app. For information about displaying ads in Safari, see SKAdNetwork for Web Ads.
The following diagram shows the path of an ad impression that wins ad attribution. The ad network serves an ad that an app or Safari web page displays. A user taps the ad and downloads the advertised app.
[Image]
Apple determines a postback data tier for the app download, and the device uses the tier later to determine the level of detail the postback can contain to ensure crowd anonymity. For more information about the postback contents and the data tiers, see Receiving postbacks in multiple conversion windows.
If the user launches the app within an attribution time-window, the ad impression is eligible for install-attribution postbacks. As the user engages with the app, the app updates the conversion value. Starting in iOS 16.1, apps can update conversion values during three conversion windows, which results in up to three postbacks for an ad signed using version 4. The system sends the postbacks to the ad network, and to the app’s developer if they opt in to receive postbacks.
Devices send install-validation postbacks to multiple ad networks that sign their ads using version 3 or later.
One ad network receives a postback with a
did-winparameter value oftruefor the ad impression that wins the ad attribution.Up to five other ad networks receive a postback with a
did-winparameter value offalseif their ad impressions qualify for the attribution, but don’t win.
The following diagram shows the path of ad impressions that qualify for, but don’t win, the ad attribution. Up to five ad networks receive a single nonwinning postback.
[Image]
For more information about receiving ad attributions, including time-window details and other constraints, see Receiving ad attributions and postbacks.
The information in the postback that Apple cryptographically signs doesn’t include user- or device-specific data. It may include values from the ad network and the advertised app if providing those values meets Apple’s privacy threshold. For more information about postback values and postback data tiers, see Receiving postbacks in multiple conversion windows. For more information about the contents of postbacks for each SKAdNetwork version, see Verifying an install-validation postback.
Presenting ads, updating conversion values, and receiving attribution
Each participant has specific responsibilities when using the ad network APIs to present ads and receive attribution.
The ad network’s responsibilities are to:
Register and provide its ad network identifier to developers. See Registering an ad network.
Serve signed ads to the source app. See Signing and providing ads.
Serve signed ads for display in Safari web pages. See the SKAdNetwork for Web Ads API.
Receive install-validation postbacks at the URL it establishes during registration.
Verify the postbacks. See Verifying an install-validation postback.
The source app’s responsibilities are to:
Add the ad network identifiers to its
Info.plistfile. See Configuring a source app.Display ads that the ad network signs. See Signing and providing ads.
The advertised app’s responsibilities are to:
Register an app installation by updating the conversion value when the user first launches the app by calling one of the conversion updating methods, such as updatePostbackConversionValue(_:coarseValue:lockWindow:completionHandler:).
Optionally, continue to update the conversion value as the user engages with the app, by calling one of the conversion updating methods, such as updatePostbackConversionValue(_:coarseValue:lockWindow:completionHandler:).
Optionally, specify a server URL in its
Info.plistfile to receive a copy of the winning install-validation postback. See Configuring an advertised app.
Apple designs SKAdNetwork APIs to maintain user privacy. Apps don’t need to use App Tracking Transparency before calling SKAdNetwork APIs, and can call these APIs regardless of their tracking authorization status. For more information about privacy, see User Privacy and Data Use.
Topics
Essentials
Signing and providing adsReceiving ad attributions and postbacksReceiving postbacks in multiple conversion windowsSKAdNetwork release notes
Registering ad networks and configuring apps
Registering an ad networkConfiguring a source appConfiguring an advertised appSKAdNetworkItemsNSAdvertisingAttributionReportEndpoint
Signing StoreKit-rendered ads
Signing view-through ads
Generating the signature to validate view-through adsSKAdImpressionstartImpression(_:completionHandler:)endImpression(_:completionHandler:)
Providing conversion information
updatePostbackConversionValue(_:coarseValue:lockWindow:completionHandler:)updatePostbackConversionValue(_:coarseValue:completionHandler:)SKAdNetwork.CoarseConversionValueupdatePostbackConversionValue(_:completionHandler:)
Verifying postbacks
Testing ad attributions and postbacks
Testing ad attributions with a downloaded profileTesting and validating ad impression signatures and postbacks for SKAdNetwork