> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revenue

> How RevenueCat purchases and ad revenue reach Appeeky Analytics and get matched to the install that made them

Appeeky Analytics has two revenue inputs:

* **RevenueCat events**: trials, purchases, renewals and refunds.
* **Ad revenue** you report from the app with `Appeeky.adRevenue()`.

All revenue is in **USD**.

***

## RevenueCat

Appeeky already receives RevenueCat events when the RevenueCat webhook is connected to your Appeeky account. Once Analytics is on for at least one app, Appeeky forwards those same events to Analytics. You do not need a second webhook in RevenueCat.

**1. Connect the RevenueCat webhook in Appeeky**

If you have not done so, connect RevenueCat under **Settings → Integrations** in Appeeky and add the webhook it gives you in RevenueCat.

**2. Turn on Analytics for the app**

See the [Quickstart](https://docs.appeeky.com/docs/analytics-quickstart.md).

**3. Call identify in the app**

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Appeeky.identify(await Purchases.getAppUserID());
```

Call it again with the new id after `Purchases.logIn()`, and pass `null` on logout.

### How a sale is matched

Each RevenueCat event names a customer: its app user id, original app user id and aliases. Appeeky looks for an install that was identified with one of those ids. When it finds one, the sale is credited to that install's source, campaign, keyword, country, device and app version.

### Which events count

| RevenueCat event | Recorded as | Counts as revenue | Makes the install a payer |
| - | - | - | - |
| `INITIAL_PURCHASE` with a trial period | `trial_started` | No | No |
| `INITIAL_PURCHASE` (no trial) | `purchase` | Yes | Yes |
| `NON_RENEWING_PURCHASE` | `purchase` | Yes | Yes |
| `RENEWAL` that converts a trial | `trial_converted` | Yes | Yes |
| `RENEWAL` | `renewal` | Yes | No |
| `REFUND` | `refund` | Yes, as a negative amount | No |

Other RevenueCat event types (cancellations, expirations, billing issues and so on) are not recorded as revenue.

* The amount is RevenueCat's USD price of the event. The local price and currency are kept for [sale alerts](https://docs.appeeky.com/docs/analytics-alerts.md).
* Only **production** events are recorded. Sandbox purchases are ignored.
* Each event is recorded once. RevenueCat retries do not double count.

### Unattributed sales

A sale with no matching install is still recorded. If your account has exactly one Analytics app on that store, the sale is credited to that app as **unattributed**. If it has more than one, the sale cannot be placed in an app and is not recorded.

Unattributed sales count toward total revenue, and show on an empty row ("Unattributed") in breakdowns. They drop out as soon as you filter the dashboard. See [Metrics](https://docs.appeeky.com/docs/analytics-metrics.md#filters).

Common reasons for unattributed sales:

* `identify` is not called, or is called after the purchase was sent.
* The purchase came from an install that ran an app version without the SDK.
* The app passes a different id to `identify` than the one RevenueCat reports for the customer.

***

## Ad Revenue

For ad-monetized apps, report each paid impression in USD. It counts as revenue for the install's source, next to RevenueCat purchases.

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
// AdMob (react-native-google-mobile-ads) paid event
rewarded.addAdEventListener(AdEventType.PAID, (event) => {
  if (event.currency === "USD") {
    Appeeky.adRevenue(event.value, { network: "admob", adUnit: "rewarded_home", format: "rewarded" });
  }
});
```

Ad revenue counts toward revenue, revenue per user, LTV and ROAS. It does not make an install a payer, so it does not change install → paid conversion, and it does not send a sale alert.

***

## Currency

Revenue is always in USD:

* RevenueCat purchases use RevenueCat's USD price.
* Ad revenue must be passed in USD. The SDK does not convert currencies.
* The Telegram sale alert shows the price in the buyer's currency, but the dashboard stores and adds up USD.

***

## SKAdNetwork Conversion Values

`Appeeky.purchased()` and `Appeeky.trialStarted()` do not record revenue. They only update the iOS conversion value. See [SKAdNetwork](https://docs.appeeky.com/docs/analytics-skadnetwork.md).

***

## Related Docs

* [Metrics](https://docs.appeeky.com/docs/analytics-metrics.md)
* [ROAS](https://docs.appeeky.com/docs/analytics-roas.md)
* [Sale Alerts](https://docs.appeeky.com/docs/analytics-alerts.md)
* [RevenueCat Overview](https://docs.appeeky.com/docs/revenuecat-overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.