# Revenue Tracking

In the **Revenue Tracking** section under **Settings**, you can set up revenue tracking three different ways. Revenue tracking is required to show revenue metrics in the Superwall dashboard.

<img src="__img0" />

Status [#status]

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

<img src="__img1" />

> **Note**

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



Methods [#methods]

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

* iOS: [App Store Connect](#ios-app-store-connect)
* Android: [Google Play](#android-google-play)

If you're using RevenueCat for purchase handling: [RevenueCat](#revenuecat)

> **Warning**

Choose only **one** of these methods.
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.



iOS: App Store Connect [#ios-app-store-connect]

Option 1 - App Store Connect Server Notifications [#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 &#x2A;*App Store Connect → App Information → App Store Server Notifications → Production & Sandbox URL fields:**

<img src="__img2" />

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

<img src="__img3" />

Then, enter this in App Store Connect modal:

<img src="__img4" />

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

Option 2 - Event Forwarding [#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:

> **Warning**

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.



```javascript
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 [#in-app-purchase-configuration]

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

<img src="__img5" />

To complete setup, follow these steps:

## Tab

- Navigate to [App Store Connect](https://appstoreconnect.apple.com). - Click on **Users and
  Access**.

## Tab

- Click on **Integrations** at the top. - Under **Keys**, choose **In-App Purchase**.

## Tab

- Click on &#x2A;*+** to create a new key if you don't have one. Add a name, and click **Generate**.> **Note**

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**.> **Warning**

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

<img src="__img6" />

## Tab

* 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.> **Warning**

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.

<img src="__img7" />- For **Issuer ID**, fill in
the value found at **Users and Access -> Integrations -> In-App Purchase** in App Store Connect:
<img src="__img8" />- **Click** on
**Update** and confirm everything is set up correctly.



App Store Connect API [#app-store-connect-api]

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

<img src="__img9" />

To complete setup, follow these steps:

## Tab

- Navigate to [App Store Connect](https://appstoreconnect.apple.com). - Click on **Users and
  Access**.

## Tab

- Click on **Integrations** at the top. - Under **Keys**, choose **App Store Connect API**.

## Tab

- 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**.> **Warning**

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

<img src="__img10" />

## Tab

* 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.
  <img src="__img11" />- For **Issuer ID**,
  fill in the value found at **Users and Access -> Integrations -> In-App Purchase** in App Store Connect:
  <img src="__img12" />- **Click** on
  **Update** and confirm everything is set up correctly.



Apple Small Business Program [#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.

<img src="__img13" />

> **Note**

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 [#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](/docs/dashboard/dashboard-settings/overview-settings-revenue-tracking-google-play).

RevenueCat [#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](https://www.revenuecat.com/docs/superwall).

Tracking Revenue with RevenueCat for iOS and Android Projects [#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](/docs/dashboard/dashboard-settings/overview-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:

<img src="__img14" />

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

<img src="__img15" />

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):

<img src="__img16" />

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

<img src="__img17" />