There are many tools like Google’s Firebase or SKAdNetwork that help developers and advertisers collect useful data. When this data is integrated into Apple Search Ads, it can guarantee the success of your ad campaign.
The new AdServices framework lets you retrieve device attribution tokens, that can be used to measure and attribute downloads in your Apple Search Ads campaigns. The token that the framework returns is a string and has a 24-hour TTL. Apple Ads Attribution API is a REST API that retrieves attribution data from Apple Search Ads campaigns.
Depending on user ATT consent, there will be a detailed or standard payload.
Here is an example of a detailed attribution response:
{ "attribution": true, "orgId": 40669820, "campaignId": 542370539, "conversionType": "Download", "clickDate": "2020-04-08T17:17Z", "adGroupId": 542317095, "countryOrRegion": "US", "keywordId": 87675432, "creativeSetId": 542317136 }
And this is an example of standard response:
{ "attribution": true, "orgId": 40669820, "campaignId": 542370539, "conversionType": "Download", "adGroupId": 542317095, "countryOrRegion": "US", "keywordId": 87675432, "creativeSetId": 542317136 }
As you can see, the only difference is clickDate
. But, since installation date can be easily determined by App Store receipt or just first launch date, we can admit that attribution works for all downloads regardless of ATT consent. Pretty cool, isn't it?
By default, the attribution payload contains just IDs: campaignId, adGroupId, keywordId. To retrieve human-readable names, you will need to make additional API calls using OAuth authorisation.
The flow is as follows:
Integrating new Apple Search Ads API in Apphud is super easy, as we do most of the work for you:
All you need to do in the app - is retrieve the attribution token and pass it to Apphud SDK.
import AdServices import iAd // optional private func trackAppleSearchAds() { if #available(iOS 14.3, *) { DispatchQueue.global(qos: .default).async { if let token = try? AAAttribution.attributionToken() { DispatchQueue.main.async { Apphud.addAttribution(data: nil, from: .appleAdsAttribution, identifer: token, callback: nil) } } } } else { // optional: send old Search Ads attribution data from older iOS versions ADClient.shared().requestAttributionDetails { data, _ in data.map { Apphud.addAttribution(data: $0, from: .appleSearchAds, callback: nil) } } } }
More details about integration can find in our documentation.
To get more insights regarding subscription app revenue growth read the Apphud Blog.