AppSkale.AI
Setup Guide

Apple Search Ads Attribution Setup Guide

This guide walks you through setting up Apple Search Ads attribution tracking with AppSkale. Once complete, you'll see exactly which keywords drive subscription revenue — not just installs. Setup takes about 10 minutes and requires an Apple Search Ads account, a RevenueCat account, and an iOS app live on the App Store.

Step 1

Generate Apple Search Ads API credentials

Apple Search Ads requires you to create a separate API useraccount to generate credentials — this is different from your regular login account. You'll need to invite yourself using another email address you own (or create one for this purpose).

Invite an API user

  1. In Apple Search Ads, go to Settings → User Management.
  2. Click Invite Users.
  3. Enter another email address you own.
  4. Set the role to API Account — Read Only.

Get your Account ID

  1. Go to searchads.apple.com and log in with your main account.
  2. Click your name in the top-right corner and look for Account ID next to your organization name (e.g. Account ID: 391139).
  3. Copy this Account ID and paste it into the AppSkale form field.

Generate API credentials

  1. Log out of your main Apple Search Ads account.
  2. Log back in with your secondary email (the API account).
  3. Go to Settings → API.
  4. Click Create Credential (or Add Certificate).
  5. When you see the Public Key field, paste the key below:
public-key.pemtext
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIQKaSROKEZSXTyRZIyBhwSoY04x8
/GNCv3cyfsuNSeDV0UCKWbxDZljPo0DEWwDUeiw3wgTaFndxzwnR3s9qvQ
  1. Click Generate (or Create).
Critical:copy these three values immediately — they're only shown once. Paste all three into the AppSkale form:
  • Client ID (e.g. SEARCHADS.abc123…)
  • Team ID (e.g. SEARCHADS.def456…)
  • Key ID (e.g. a1b2c3d4-5678…)

Then click Save & Continue.

Step 2

Configure your iOS app in AppSkale

Next, add your iOS app to AppSkale so it can start tracking attribution and revenue.

Add your app

  • App Name * — the name of your app as it appears in the App Store.
  • App Store URL *— your app's URL from the App Store; must include the app ID. Format: https://apps.apple.com/us/app/your-app/id1234567890
  • Bundle ID *— your app's unique identifier, found in Xcode or App Store Connect. Format: com.yourcompany.yourapp
Once your app is added, you'll see a confirmation message and your unique API key. Save it somewhere secure — you'll need it for both SDK integration and RevenueCat webhook authentication. Example format: appskale_abc123def456…
Step 3

Set up the RevenueCat webhook

The webhook is how RevenueCat tells AppSkale about real-time purchases, renewals, and refunds — so we can attribute revenue back to the keyword that drove each user.

  1. Go to app.revenuecat.com and navigate to Integrations → Webhooks.
  2. Click + Add (or Add Webhook).
  3. Paste this Webhook URL:
url
https://api.appskale.ai/api/webhooks/revenuecat
  1. Authorization Header Value: paste your AppSkale API key directly — e.g. appskale_abc123def456…
  2. Environment: select both Production and Sandbox.
  3. Apps: select your app. Events: select all events.
  4. Click Save.
Step 4

Install the AppSkale SDK

The SDK automatically tracks installs and retrieves Apple Search Ads attribution data on device.

Installationshell
Installation
You can install the AppSkale SDK using either CocoaPods or Swift Package Manager:

Option 1: CocoaPods
Add to your Podfile:
  pod 'AppSkaleSDK'
Then run in your Terminal:
  pod install

Option 2: Swift Package Manager (SPM)
1. In Xcode, go to File > Add Packages…
2. Enter the repository URL:
     https://github.com/appskale/appskale-sdk-ios
3. Select the latest version and target your project
4. Click "Add Package"

After installing the SDK, add this code to your AppDelegate.swift file:

AppDelegate.swiftswift
import AppSkaleSDK

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions:
            [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {

        ApplicationDelegate.shared.application(
            application,
            didFinishLaunchingWithOptions: launchOptions
        )

        AppSkaleAttribution.shared.configure(
            apiKey: "YOUR_API_KEY_HERE"
        )

        return true
    }
}
Replace YOUR_API_KEY_HERE with the actual API key from the setup page.
Step 5

Track purchases

Add this code wherever you handle successful purchases — typically inside your RevenueCat purchase completion handler:

PurchaseHandler.swiftswift
Purchases.shared.purchase(package: package) {
    (transaction, purchaserInfo, error, userCancelled) in

    // After successful purchase, track with AppSkale:
    if let transaction = transaction {
        let price = package.storeProduct.price as Decimal
        let currency = package.storeProduct.priceFormatter?
            .currencyCode ?? "USD"

        AppSkaleAttribution.shared.trackPurchase(
            transactionId: transaction.transactionIdentifier ?? "unknown",
            productId: package.storeProduct.productIdentifier,
            price: NSDecimalNumber(decimal: price).doubleValue,
            currency: currency
        )
    }
}
That's it! The SDK automatically tracks app installs, retrieves Apple Search Ads attribution data, and links every purchase back to the keyword that drove it.

Need a hand?

If you get stuck on any step, email support@appskale.ai and we'll walk you through it.