
{% callout type="note" %}
Ingestion with this integration is available only for Statsig Cloud. For Warehouse Native, create a metrics source that references this data in your warehouse.
{% /callout %}

## How the RevenueCat integration works

Enabling the RevenueCat integration allows Statsig to pull billing, subscription, and revenue metrics into your Statsig projects. This lets you optimize purchases and revenue using Statsig's feature gates or experimentation tools without any additional logging.

Statsig integrates with RevenueCat through a webhook and receives data as described [in the RevenueCat documentation](https://docs.revenuecat.com/docs/webhooks).

## Configuring incoming metrics

1. Copy your **Statsig Server Secret Key** from the [API Keys](https://console.statsig.com/api_keys) tab in the Statsig console.

2. Navigate to your app in the RevenueCat dashboard and choose **Statsig** from the Integrations menu.

3. Enter your **Statsig Server Secret** and click **Save**.

   {% figure %}
   ![RevenueCat integration settings entering Statsig secret](/images/integrations/data-connectors/revenuecat/f8b5f66-Screen_Shot_2021-11-05_at_9.20.40_AM.png)
   {% /figure %}

4. On the Statsig [Integrations](https://console.statsig.com/integrations) page, enable the RevenueCat integration.

If you're running an experiment with the user as your unit type, you must set the RevenueCat `appUserID` to match the `userID` that you log with the Statsig SDK. For example, set this when you expose the user to a Statsig feature gate or experiment. Refer to [how to set the `appUserID` on RevenueCat](https://docs.revenuecat.com/docs/user-ids#provided-app-user-id).

By default, Statsig doesn't ingest [Sandbox events](https://docs.revenuecat.com/docs/webhooks#testing) from RevenueCat, to reduce noise from test events. You can explicitly enable ingestion of Sandbox events using the Statsig [Integrations](https://console.statsig.com/integrations) page while debugging.
