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

Choose only one of the three methods below. 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.

Revenue tracking status

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

App Store Connect

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:

When you enter this in App Store Connect, be sure to choose version 2 server notifications:

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

Event Forwarding

If you handle subscription logic on your own server and are using Apple’s subscription events with version 2 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)
    }
  }
)

RevenueCat

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

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.