Settings

Revenue Tracking

In the Revenue Tracking section under Settings, you connect the sources that send your app's subscription events to Superwall. Revenue tracking is required to show revenue metrics in the Superwall dashboard.

Status

Your revenue tracking status will be listed at the top, indicating if you've successfully set it up or not:

Until we receive the first event for your app (including Sandbox events), the configuration will still show as missing.

Methods

There are different methods for revenue tracking depending on your platform:

If you're using RevenueCat for purchase handling: RevenueCat

As soon as you've completed the steps for any of them, you should see integrated events begin to show up in Superwall's metrics.

You can connect more than one source. An app can receive Apple's notifications and RevenueCat's events at the same time, and Superwall stores both. What you choose once is the revenue provider: the source your revenue metrics count.

Choosing a revenue provider

The revenue provider decides which source every revenue figure in the dashboard counts:

  • The store (App Store Connect or Google Play): the events the store sends straight to Superwall.
  • RevenueCat: the events RevenueCat sends through its Superwall integration.

Events from the other source keep arriving and being stored. They stop being counted, and you can switch back. Until a provider is chosen, events from every source are counted, so choose one when more than one source is sending.

Choosing a provider is separate from receiving events. Setting Apple's server notification URL does not change it, and changing it does not touch the URL.

From the Superwall CLI:

superwall apps get <app>                                      # what is counted, and what each source sent
superwall apps update <app> --revenue-provider open_revenue   # count the store's own events
superwall apps update <app> --revenue-provider revenue_cat    # count RevenueCat's events

iOS: App Store Connect

Apple sends an app's notifications to one URL per environment, so pick one route for them: straight from App Store Connect (Option 1), forwarded from your own server (Option 2), or forwarded from RevenueCat when RevenueCat's URL is the one in App Store Connect.

Option 1 - App Store Connect Server Notifications

Use this method to forward subscriptions events from App Store Connect back to Superwall. To get started, go to App Store Connect → App Information → App Store Server Notifications → Production & Sandbox URL fields:

For the URL, use the value in Superwall that was prefilled by clicking the copy button:

Then, enter this in App Store Connect modal:

Click the Save button once you've entered in the URL.

Option 2 - Event Forwarding

If you handle subscription logic on your own server and are using Apple's subscription events notifications, use this method. It will forward Apple subscription events from your server to Superwall.

To implement this method, simply forward the unmodified request to Superwall before any other application logic.

Here's a Node.js example, just be sure to use your own API key in place of YOUR_PRIVATE_KEY in the snippet below:

Your private key is not the same as your public key. Superwall will prefill your private key in the code snippets on the Revenue Tracking page for both Event Forwarding and App Store Connect setup.
request.post(
  {
    url: "https://superwall.com/api/integrations/app-store-connect/webhook?pk=YOUR_PRIVATE_KEY",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(req.body),
    timeout: 5000,
  },
  (error, response, body) => {
    if (!error && response.statusCode == 200) {
      console.log("Successfully forwarded to Superwall")
    } else {
      console.error("Failed to send notification to Superwall", error)
    }
  }
)

In-App Purchase configuration

Setting up the in-app purchase configuration for iOS apps allows Superwall to power features like refund consumption.

To complete setup, follow these steps:

  • Click on Integrations at the top. - Under Keys, choose In-App Purchase.
  • Click on + to create a new key if you don't have one. Add a name, and click Generate.

You can reuse the same key for all of the apps falling under the same App Store Connect account. Though, you must still have access to the one-time download of its generated P8 key file. If you don't have access to this anymore, simply create a new one.

  • Click on "Download In-App Purchase Key" for the new key. On the resulting modal, click Download.

IMPORTANT: You only have one chance to download the key file. Make sure to save it in a secure location.

  • Upload the key file you downloaded in the previous step to Superwall under "P8 Key File." - Fill in the Bundle ID of your app. - Enter the Key ID of the key you created in App Store Connect. You can find it in the "Key ID" column shown in the image from step 3. Locate the row for the key you made and copy the corresponding Key ID here.

Bundle IDs are case-sensitive. Enter the Bundle ID exactly as it appears in App Store Connect or Xcode, including capitalization. For example, com.Company.App and com.company.app are treated as different bundle IDs.

- For Issuer ID, fill in the value found at Users and Access -> Integrations -> In-App Purchase in App Store Connect: - Click on Update and confirm everything is set up correctly.

App Store Connect API

Setting up the App Store Connect API helps Superwall pull product data from the App Store.

To complete setup, follow these steps:

  • Click on Integrations at the top. - Under Keys, choose App Store Connect API.
  • Choose Team Keys and create a new one. - Add a name, and for Role choose App Manager. - Click on Generate. - Click on Download for the new key. On the resulting modal, click Download.

IMPORTANT: You only have one chance to download the key file. Make sure to save it in a secure location.

  • Upload the key file you downloaded in the previous step to Superwall under "P8 Key File." - Enter the Key ID of the key you created in App Store Connect. You can find it in the "Key ID" column shown in the image from step 3. Locate the row for the key you made and copy the corresponding Key ID here. - For Issuer ID, fill in the value found at Users and Access -> Integrations -> In-App Purchase in App Store Connect: - Click on Update and confirm everything is set up correctly.

Apple Small Business Program

If you are part of Apple's Small Business Program, your proceeds cut is 15% instead of the standard 30%. To ensure Superwall reports revenue correctly, add the date you were accepted into the program. Optionally, add the date you were removed if applicable.

If you added your Apple Small Business Program status later on, Superwall will accurately reflect revenue for any new data. It does not backfill existing revenue metrics.

Android: Google Play

You can now forward subscription events directly from Google Play to Superwall. For implementation details, please refer to our guide on Revenue Tracking for Google Play.

RevenueCat

Finally, if you're using RevenueCat, you can forward subscription events from RevenueCat to back to Superwall. For implementation details, please refer to their documentation.

This integration sends RevenueCat's own events. To also receive Apple's original notifications while RevenueCat's URL stays in App Store Connect, see Forward Apple's Notifications from RevenueCat.

Tracking Revenue with RevenueCat for iOS and Android Projects

If you are using RevenueCat and have both an Android and iOS app under the same project, be aware that you should have two Superwall apps (one for Android and iOS). Then, you can link them together as one project under Settings -> Projects. In your RevenueCat project, you can refer to either the iOS or Android key from Superwall. Superwall will still segment the data by platform.

Here's an example, this app has both an Android and iOS project in Superwall. Both of them use RevenueCat:

In Superwall, those have been linked together as a project:

For either the iOS or Android project, go to Settings -> Revenue Tracking -> RevenueCat and get the integration token (or make one if you haven't yet):

Finally, in RevenueCat, use the token in their integration settings for Superwall:

How is this guide?

On this page