RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Apple Search Ads

Collect and view Apple Search Ads attribution in RevenueCat

With our Apple Search Ad integration you can:

  • Continue to follow your campaign's install base for months to understand the long-tail revenue generated from subscriptions, even without an app open.
  • Filter and segment RevenueCat charts by Apple Search Ad campaigns or ad groups.

1. Send attribution data to RevenueCat

Option 1: Automatic attribution collection

The Purchases SDK can automatically collect Apple Search Ad attribution data as long as you include the iAd framework to your Xcode project and set automaticAttributionCollection = true.

import iAd
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
		
    Purchases.automaticAppleSearchAdsAttributionCollection = true
    Purchases.configure(withAPIKey: "public_sdk_key", appUserID: "my_app_user_id")
    
    return true
}
#import <iAd/iAd.h>
... 
- (BOOL)application:(UIApplication *)application 
  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  
  RCPurchases.automaticAttributionCollection = YES;
  [RCPurchases configureWithAPIKey:@"public_sdk_key" appUserID:@"my_app_user_id"];

}

Automatic attribution is collected for the configured App User Id

If you're changing the App User Id after configuration, you should manually collect the Apple Search Ad attribution after you've set the correct App User ID as shown below.

Option 2: Manual attribution collection

You can also send Apple Search Ad attribution to RevenueCat manually with the addAttribution method. This may be preferable if you are changing the App User Id after configuration.

import iAd
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
		
    Purchases.configure(withAPIKey: "public_sdk_key")
    
    //... set the correct App User Id somewhere here
    
    ADClient.shared().requestAttributionDetails { (details, error) in
        if let details = details {
            Purchases.addAttributionData(details, from: .appleSearchAds)
        }
    }
    
    return true
}
#import <iAd/iAd.h>
... 
- (BOOL)application:(UIApplication *)application 
  didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  
  [RCPurchases configureWithAPIKey:@"public_sdk_key"];
    
  //... set the correct App User Id somewhere here
    
  [[ADClient sharedClient] 
   requestAttributionDetailsWithBlock:^(
     NSDictionary *details, 
     NSError *error) { 
     if (error == nil) {
       [RCPurchases addAttributionData:details
                              fromNetwork:RCAttributionSourceAppleSearchAds];
     }
   }];

}

Disable Automatic Attribution Collection

If your collecting Apple Search Ad attribution manually, be sure automaticAttributionCollection is set to false (default).

2. View attribution data in RevenueCat

After the Purchases SDK has collected attribution for some users, you'll be able to segment and view charts for those conversions.

Choose conversion level

In the 'Select Segment' dropdown choose Campaign or Ad Group from the Apple Search Ads section.

View charts

Apple Search Ad attribution is available as segments and filters in the following charts:

  • Monthly Recurring Revenue
  • Revenue
  • New Purchases and Trials
  • Active Subscriptions and Trials

Filter chart to compare individual campaigns or ad groups

Select and deselect rows to compare individual campaigns or ad sets

Apple Search Ads


Collect and view Apple Search Ads attribution in RevenueCat

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.