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 ⚡️
The Statsig integration tracks the following events:
|Event Type||Default Event Name||Description||App Store||Play Store||Amazon||Stripe||Promo|
|Initial Purchase||`||A new subscription has been purchased.||✅||✅||✅||✅||❌|
|Renewal||`||An existing subscription has been renewed or a lapsed user has resubscribed.||✅||✅||✅||✅||❌|
|Cancellation||`||A subscription or non-renewing purchase has been cancelled. See [cancellation reasons](🔗) for more details.||✅||✅||✅||✅||✅|
|Uncancellation||`||A non-expired cancelled subscription has been re-enabled.||✅||✅||✅||❌||❌|
|Non Subscription Purchase||`||A customer has made a purchase that will not auto-renew.||✅||✅||✅||✅||✅|
|Subscription Paused||`||A subscription has been paused.||❌||✅||❌||❌||❌|
|Expiration||`||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||`||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.
# 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**
# 3. Testing the Statsig integration
Ingesting sandbox events into Statsig can be enabled in the RevenueCat configuration in the 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.