Apple Search Ads Attributions
Receive events from Apple Search ads to Appflow.ai
当我们需要通过appflow的Settings -> Applications -> 选择对应的app -> Edit-> integrations → Apple Search Ads来拉取ads报表数据时,我们有两种方式去配置:

方式一:使用默认公私钥,无须用户手动生成公私钥(ps: 使用此方式切勿上传Private key到appflow)
使用appflow自动生成的默认public key和private key, 如下图(避免默认的private-key泄露,所以显示为空)
我们只需要默认的public key粘贴到apple search ads的 Account Settings > API 的 public key位置,如下图①:
步骤2完成保存后,将apple search ads里的clientId、teamId、keyId 粘贴到appflow的apple search ads配置里的对应位置,如下图:
保存,等待appflow拉取
方式二:用户手动生成公私钥
用户自己在本地终端创建私钥:
openssl ecparam -genkey -name prime256v1 -noout -out private-key.pem
会生成内容类似下面的private-key.pem文件:
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIKtnxllRY8nbndBQwT9we4pEULtjpW605iwvzLlKcBq4oAoGCCqGSM49
AwEHoUQDQgAEY58v74eQFyLtu5rtCpeU4NggVSUQSOcHhN744t0gWGc/xXkCSusz
LaZriCQnnqq4Vx+IscLFcrjBj+ulZzKlUQ==
-----END EC PRIVATE KEY-----
再通过上述生成的私钥构建公钥
openssl ec -in private-key.pem -pubout -out public-key.pem
会生成内容类似下面的public-key.pem文件
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYI8J2T8X8CW+eFTTwSQK9/biBaWz
6wSnqksR5IjNj+XMlipCXTMY2pFznbTL/gs9oi5Rsudi3fSxINnHfE+N0w==
-----END PUBLIC KEY-----
将public-key.pem的内容粘贴到apple search ads的 Account Settings > API 的 public key位置,如下图①:
步骤3完成保存后,将apple search ads里的clientId、teamId、keyId 粘贴到appflow的apple search ads配置里的对应位置,如下图:
保存,等待appflow拉取
Data pull warning
Apple Search ads will give us data from 30 days before you set the keys with Appflow.ai so hurry up to get more data on our platform
Uploading usual basic ASA
Required step!
SDK part below is required for basic and advanced ASA anyway
To upload Apple Search ads attribution data, refer to the following example, For the AdServices Framework
if let attributionToken = try? AAAttribution.attributionToken() {
let attributionDetails = ["attributionToken": attributionToken]
Appflow.shared.updateAttribution(attributionDetails, source: .appleSearchAds)
}
For the iAd Framework
iAd is an old way to use (before ios 14.3)
AdService framework or iAd should be represented from your side(enable it on the app side). IAD is not representing downloads from ASA campaigns. It's not affecting Appflow data results
ADClient.shared().requestAttributionDetails({ (attributionDetails, error) in
guard let attributionDetails = attributionDetails else {
return
}
Appflow.shared.updateAttribution(attributionDetails, source: .appleSearchAds)
})
Last updated
Was this helpful?