Skip to main content

Overview

This guide provides instructions for integrating Apple Search Ads attribution with the AppTrove iOS SDK. Apple Search Ads is an advertising platform that promotes apps within App Store search results. The SDK uses Apple's AdServices framework to track installs driven by Search Ads campaigns, enabling precise measurement and optimization.

Prerequisites

  • iOS 14.3 or later and Xcode 12.0 or later
  • AppTrackingTransparency configured for user consent (if targeting iOS 14.5 or later)
  • Access to the Trackier Panel and an Apple Search Ads account
  • Basic knowledge of Swift and iOS development

Apple Search Ads

Apple Search Ads allows developers to promote their apps in App Store search results by bidding on keywords. The AppTrove iOS SDK supports attribution for these campaigns using Apple's AdServices framework (introduced in iOS 14.3), capturing attribution tokens for detailed campaign data, such as keyword performance and ad placement. This integration provides actionable insights for optimizing ad spend and marketing strategies.

Key Benefits

  • Accurate Attribution: Track which keywords and campaigns drive installs, ensuring precise measurement of ad performance.
  • Optimized Ad Spend: Analyze campaign effectiveness to adjust bids and target high-performing keywords.
  • Privacy Compliance: Uses Apple's privacy-focused AdServices framework, respecting user consent via AppTrackingTransparency (ATT).
  • Seamless Integration: Combines with Trackier's analytics for a unified view of campaign data alongside other attribution sources.

Use Case

A developer running a Search Ads campaign for a fitness app can track installs from keywords like "workout app" or "fitness tracker." By analyzing which keywords drive the most installs, they can optimize bids to maximize ROI.


Configuration

To enable Apple Search Ads attribution, update your SDK initialization to include the AdServices framework's attribution token. The following example demonstrates the configuration in AppDelegate.

AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

/* While Initializing the Sdk, You need to pass the two arguments in the TrackierSDKConfig.
* In First argument, you need to pass the AppTrove SDK key
* In second argument, you need to pass the environment which can be either "development", "production" or "testing". */

let config = TrackierSDKConfig(appToken: "xxxx-xx-xxx-xxx", env: TrackierSDKConfig.ENV_DEVELOPMENT) // Pass your AppTrove SDK api key
// Apple Search Ads Attribution code
if #available(iOS 14.3, *) {
let a = try? AAAttribution.attributionToken()
TrackierSDK.updateAppleAdsToken(token: a!)
} else {
// Fallback on earlier versions
}
TrackierSDK.initialize(config: config)
return true
}


Best Practices

  • Ensure AdServices Integration: Verify the AdServices framework is included in your project and the attribution token is captured during SDK initialization.
  • Handle ATT Consent: For iOS 14.5 and later, request user consent via AppTrackingTransparency before collecting attribution data.
  • Test in Development Mode: Use ENV_TESTING or ENV_DEVELOPMENT to validate attribution data before deploying to production.
  • Monitor Keyword Performance: Regularly analyze campaign data in the Trackier Panel to optimize bids and target high-performing keywords.

Troubleshooting

  • Attribution Data Missing: Ensure the AdServices framework is correctly integrated and the app is running on iOS 14.3 or later.
  • Token Retrieval Failure: Verify the AAAttribution.attributionToken() call is executed and the token is passed to TrackierSDK.updateAppleAdsToken.
  • Privacy Issues: Confirm AppTrackingTransparency is configured and user consent is obtained for iOS 14.5 and later.
  • Campaign Data Inaccuracy: Check the Apple Search Ads campaign settings and Trackier Panel configuration for consistency.

For further assistance, refer to the Trackier Documentation Portal or contact Trackier support at support@trackier.com.