Create, optimize, and scale Apple Search Ads campaigns with API automation, attribution integration, and bid strategy recommendations.
SKILL.md
Apple Search Ads 🍎
Complete toolkit for Apple Search Ads: Campaign Management API v5, attribution integration (AdServices + SKAdNetwork), bid optimization, and strategic recommendations.
On first use, read setup.md for integration guidelines.
When to Use
User needs to run Apple Search Ads for iOS apps. Agent handles campaign creation, bid optimization, attribution tracking, performance analysis, and strategic recommendations.
Architecture
Memory lives in ~/apple-search-ads/. See memory-template.md for structure.
Generic keywords → Start low, increase for winners
Discovery (Search Match) → Low bids, mine for keywords
Negative keywords → Essential to reduce waste
Bid Optimization Loop
Week 1: Set baseline bids (industry avg or $1-2)
↓
Week 2: Review search term report
- High converts, low bid → raise bid 20-30%
- Low converts, high spend → lower bid or pause
- Irrelevant terms → add as negative
↓
Week 3+: Repeat. Target CPA within 20% of goal.
Attribution Integration
AdServices Framework (iOS 14.3+)
Modern attribution without user tracking. Integrates directly in iOS app.
import AdServices
func trackAttribution() async {
do {
// 1. Get attribution token from device
let token = try AAAttribution.attributionToken()
// 2. Send to Apple's attribution API
var request = URLRequest(url: URL(string: "https://api-adservices.apple.com/api/v1/")!)
request.httpMethod = "POST"
request.setValue("text/plain", forHTTPHeaderField: "Content-Type")
request.httpBody = token.data(using: .utf8)
let (data, _) = try await URLSession.shared.data(for: request)
let attribution = try JSONDecoder().decode(Attribution.self, from: data)
// 3. attribution contains: campaignId, adGroupId, keywordId, etc.
// Send to your analytics backend
} catch {
// Not from Apple Search Ads or error
}
}
struct Attribution: Codable {
let attribution: Bool
let orgId: Int?
let campaignId: Int?
let adGroupId: Int?
let keywordId: Int?
let creativeSetId: Int?
let conversionType: String?
let clickDate: String?
}
SKAdNetwork 4.0
Privacy-focused attribution for installs. Apple aggregates data, no user-level tracking.
// In your app delegate
import StoreKit
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Register for attribution
SKAdNetwork.updatePostbackConversionValue(0) { error in
// Initial registration
}
return true
}
// When user completes valuable action (purchase, signup, etc.)
func trackConversion(value: Int) {
// value 0-63, represents conversion value
SKAdNetwork.updatePostbackConversionValue(value) { error in
if error == nil {
// Updated successfully
}
}
}
SKAdNetwork Conversion Value Strategy
Value
Meaning
Example
0
Install only
App opened
1-10
Engagement tier
Sessions, time in app
11-30
Feature usage
Key feature activated
31-50
Monetization signal
Trial started, content viewed
51-63
Revenue tier
Purchase completed
MMP Integration (AppsFlyer, Adjust, etc.)
If using an MMP, they handle AdServices and SKAdNetwork. Follow their SDK docs. Key integration points:
Initialize MMP SDK before any tracking
Configure SKAdNetwork conversion values in MMP dashboard
Link Apple Search Ads account in MMP for cost data
Expand: Germany, France, Japan, South Korea (localize)
Test: Brazil, Mexico, India (high volume, lower CPT)
Localization checklist:
App Store listing translated
Custom Product Pages per country
Keywords researched per language
Separate campaigns per country (easier optimization)
Custom Product Pages (CPP)
Create variations of your App Store page for different audiences.
// Get available CPPs
// GET /apps/{adamId}/customproductpages
// Create ad using CPP
{
"name": "Fitness Ad - Summer Campaign",
"adGroupId": 12345,
"creativeType": "CUSTOM_PRODUCT_PAGE",
"productPageId": "cpp-uuid-here"
}
Best practices:
Create CPP for each major keyword theme
Test: Control (default) vs CPP
Rotate seasonally (holidays, events)
Scripts & Automation
See scripts.md for complete script library. Key scripts: