Appflow.ai
Visit our websitePricingSign up for freeLog in
  • GET STARTED
    • What is Appflow.ai?
    • Quickstart - How to start working with Appflow.ai?
    • FAQ
    • Ownership and other roles
  • SDK Set-up Instructions
    • Android SDK
      • Google Play Store Credentials
        • Google Service Account Key
        • Google real-time developer notifications(RTDN)
        • FCM server key(optional)(to be updated)
      • Events (Custom events)
      • Purchases
      • Visual constructor
      • User info
      • Push notifications
    • iOS SDK
      • Specify Apple Store Keys
      • Purchases and User Info
      • Event tracking (Custom events)
      • Push Notifications Configuration
      • Visual constructor
  • IN-APP PURCHASE
    • SKU adding
  • METRICS & EVENTS
    • Calculations of Analytics
    • Terms and Descriptions
    • Purchase Events
    • In-app Events
    • Events Structure
    • End-users Attributes
    • Users' statuses
  • SUBSCRIPTION ANALYTICS
    • Dashboard
    • Configurator
    • Reports
    • A/B Testing
    • Integrations
    • Create Push-notifications
    • In-app Messages
    • Return of Advertisement
    • Funnels
    • Funnel 2.0 BETA
    • Entitlements
    • Visual Constructor
  • INTEGRATIONS
    • Adjust
    • Appsflyer
    • Mixpanel
    • Webhooks
    • Apple Search Ads Attributions
    • Branch
    • Amplitude
  • OTHERS
    • Pricing plans and important information about your payments
    • Storing your data
    • Privacy Policy
    • Terms of Use
    • Unsubscribe from Appflow.ai
Powered by GitBook
On this page

Was this helpful?

  1. INTEGRATIONS

Apple Search Ads Attributions

Receive events from Apple Search ads to Appflow.ai

PreviousWebhooksNextBranch

Last updated 1 year ago

Was this helpful?


Set up keys for Appflow.ai

Please, start your ASA Advanced integration by working with Appflow.ai keys Follow 6 steps below

To add key:

  1. Invite any apple account as the API account. The role should be API Account manager.

API account manager is any person (even you) just with another Apple id email than already exists in your account)

  1. Log in into ASA with your API manager account and go to API settings. All campaigns => Account Settings => API

  2. Set the key into Appflow. There are two ways:

  • a. Export the key from Apple Search ads

In case of many iOS apps on Appflow from the same Apple Account

Use only this way - private key uploading TO Appflow. With one iOS app, it's easier to use the way b below Same key from ASA - to all your apps into Appflow

Use the following command to extract a public key from your persisted private key:

openssl ec -in private-key.pem -pubout -out public-key.pem
Parameter
Description

-in

The private key filename: private-key.pem

-out

The ec256-public-key file where you generate and store the public key.

Open the public-key.pem file in a text editor and copy the public key, including the begin and end lines.

after that go to Appflow Settings => Your App => Edit => Apple Search Ads and upload the private key After that put the private key to the ASA

OR

RECOMMENDED:

  • b. Once you switch on the ASA on Appflow, Appflow will generate the key, and display the public key for you. You can just paste the public key to ASA setting page.(from step 2.) You don't need to care about how to generate the key anymore.

  1. If you have added a public key to the ASA, ASA will generate client ID, teamId, keyId for you.

  1. Copy them and paste into Appflow.ai.

6. Don't forget to activate your ASA on Appflow.ai!

Don't forget to check SDK requirements below

one more small addition to your SDK for ASA


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)
})

https://developer.apple.com/documentation/apple_search_ads/implementing_oauth_for_the_apple_search_ads_api