The Statsig integration is available on the [Pro](🔗) plan.
Statsig can be a helpful integration for optimizing purchases and revenue, and understanding which features are causing product metrics to move. RevenueCat can automatically send billing, subscription, and revenue metrics to your Statsig project.
With our Statsig integration, you can:
Compute how every new product improvement impacts your business metrics
Simplify setting up Feature Gates and be able to automatically A/B test new features
Run multiple independent experiments in parallel
With accurate and up-to-date subscription data in Statsig, you'll be set to turbocharge your product analytics ⚡️
# Events
The Statsig integration tracks the following events:
Event Type | Default Event Name | Description | App Store | Play Store | Amazon | Stripe | Promo |
Initial Purchase | `rc_initial_purchase_event ` | A new subscription has been purchased. | ✅ | ✅ | ✅ | ✅ | ❌ |
Renewal | `rc_renewal_event ` | An existing subscription has been renewed or a lapsed user has resubscribed. | ✅ | ✅ | ✅ | ✅ | ❌ |
Cancellation | `rc_cancellation_event ` | A subscription or non-renewing purchase has been cancelled. See [cancellation reasons](🔗) for more details. | ✅ | ✅ | ✅ | ✅ | ✅ |
Uncancellation | `rc_uncancellation_event ` | A non-expired cancelled subscription has been re-enabled. | ✅ | ✅ | ✅ | ❌ | ❌ |
Non Subscription Purchase | `rc_non_subscription_purchase_event ` | A customer has made a purchase that will not auto-renew. | ✅ | ✅ | ✅ | ✅ | ✅ |
Subscription Paused | `rc_subscription_paused_event ` | A subscription has been paused. | ❌ | ✅ | ❌ | ❌ | ❌ |
Expiration | `rc_expiration_event ` | A subscription has expired and access should be removed. If you have [Platform Server Notifications](🔗) configured, this event will occur as soon as we are notified (within seconds to minutes) of the expiration. If you do not have notifications configured, delays may be approximately 1 hour. | ✅ | ✅ | ✅ | ✅ | ✅ |
Billing Issue | `rc_billing_issue_event ` | There has been a problem trying to charge the subscriber. This does not mean the subscription has expired. Can be safely ignored if listening to CANCELLATION event + cancel_reason=BILLING_ERROR. | ✅ | ✅ | ✅ | ✅ | ❌ |
# 0. Matching RevenueCat Users with Statsig Users
In order to associate RevenueCat data with Statsig feature gate and/or experiment, the RevenueCat app user ID must match the Statsig User ID. You can read more about Statsig user IDs in their documentation [here](🔗). You can set up a custom app user ID in RevenueCat by following the instructions in our [Identifying Users](🔗) documentation.
# 1. Enable RevenueCat integration with Statsig
On the Statsig [Integration page](🔗) enable the RevenueCat integration.

Enable RevenueCat in Statsig integration page
# 2. Send RevenueCat events into Statsig
After you enabled the RevenueCat integration in Statsig's dashboard, you can "turn on" the integration from the RevenueCat dashboard.
Navigate to your project in the RevenueCat dashboard and find the _Integrations_ card in the left menu. Select **+ New**

Choose **Statsig** from the Integrations menu.
Add your ['statsig-server-secret'](🔗)
Remember to select **Add Integration**

Statsig configuration page
# 3. Testing the Statsig integration
Ingesting sandbox events into Statsig can be enabled in the RevenueCat configuration in the Statsig [Integration page](🔗).

Include Sandbox Events in Statsig integration page
## Make a sandbox purchase with a new user
Simulate a new user installing your app, and go through your app flow to complete a sandbox purchase.
## Check that the Statsig event delivered successfully
While still on the Customer View, select test purchase event in the [Customer History](🔗) page and make sure that the Statsig integration event exists and was delivered successfully.

## Check Statsig dashboard for the delivered event
Navigate to your Statsig app > Metrics. You will see events RevenueCat has dispatched to Statsig under 'Log Stream'.

# Sample Events
Below are sample JSONs that are delivered to Statsig for each event type.
You've done it!
You should start seeing subscription data from RevenueCat appear in Statsig.