What’s new in Apphud: Renewals Performance Report, Real-time User Properties for Paywalls, and iOS SDK Update.Let’s see
Apphud
Why Apphud?PricingContact
Ren
Ren
October 19, 2021
3 min read

Measuring Apple Search Ads campaigns without IDFA

Let's take a closer look at one of the features that is fully supported by Apphud – new Apple Search ads attribution, which works on iOS 14.3+ devices via AdServices framework and doesn't require user ATT consent.

Measuring Apple Search Ads campaigns without IDFA

Apple Ads Attribution API

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.

Interaction between Apple Ads Attribution API and AdServices frameworkInteraction between Apple Ads Attribution API and AdServices framework

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?


Retrieving campaign names

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:

  • Create and invite a new user to the Apple Search Ads dashboard with API user role.
  • Generate public-private key pair.
  • Upload public key in Apple Search ads setting under the user with API role.
  • Copy Client Secret, Team ID, Key ID.
  • Get Access Token with given fields.
  • After all of that, you can make API calls to get campaign names, keyword names, etc.

Measuring Apple Search Ads campaigns in Apphud

Integrating new Apple Search Ads API in Apphud is super easy, as we do most of the work for you:

  • Apphud generates a public key for you, just copy the value and insert it into the Apple Search Ads settings under the user with API user role.
  • Automatically retrieves access token and campaign names.
  • Displays human-readable attribution data on a user page.
  • Shows charts segmented by campaign, ad set group, and even by keyword.
  • Works in real-time.
  • There’s no need to set up SKAdNetwork and call updateConversionValue – Apple Search Ads and SKAdNetwork can work without each other perfectly well.
User page in Apphud that came from Apple Search Ads campaignUser page in Apphud that came from Apple Search Ads campaign
Analyze your Apple Search Ads campaigns in ApphudAnalyze your Apple Search Ads campaigns in Apphud

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.

Ren
Ren
Co-founder at Apphud
Ex iOS app and game developer. 11 years in the industry since iOS 3. More than 50 apps are in the background with 4 exits. Entrepreneur and traveler.

Related Posts