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

# Statsig

> Forward feature gate, dynamic config, and experiment exposures from Statsig to MoEngage to enrich user profiles and trigger feature-aware campaigns.

# Introduction

[Statsig](https://statsig.com/) is a feature management and experimentation platform that teams use to run feature gates, dynamic configurations, and A/B tests in production. Statsig sends real-time event webhooks for exposures and config changes, so you can react to feature and experiment activity as it happens.

# MoEngage × Statsig

The MoEngage and Statsig integration uses real-time feature and experiment data to enrich user profiles and power personalized engagement. When Statsig forwards exposure events to MoEngage, you can segment users by feature eligibility, run experiment-driven campaigns, and keep feature state consistent across your marketing stack.

## Use Cases

Integrating Statsig with MoEngage helps you address the following use cases:

* **Experiment-driven personalization**: Trigger personalized campaigns based on the experiment group a user falls into, so your messaging varies with the data.
* **Feature-gated segmentation**: Build dynamic segments of users exposed to specific feature gates, for targeted onboarding, beta testing, or early-access campaigns.
* **Config-driven journeys**: Use dynamic config exposures to trigger different journey flows based on rules that Statsig evaluates, so messaging matches feature availability.
* **Real-time feature state sync**: Keep MoEngage user profiles in step with feature gate status, so campaigns respond immediately to feature rollouts and rollbacks.

## Key Features

The Statsig integration provides the following capabilities in MoEngage:

* **Real-time event sync**: Statsig syncs gate, config, and experiment exposures to MoEngage as they occur, so you can trigger timely, feature-aware campaigns.
* **User profile enrichment**: MoEngage updates user profiles with the exposure metadata that Statsig sends, which you can then use for segmentation and journey orchestration.
* **Flexible event filtering**: Choose which event types to forward, so you control the data volume and its relevance.

# Integration

<Info>
  **Prerequisites**

  Before you begin, ensure you have the following access:

  * Admin access to your Statsig workspace.
  * Admin access to your MoEngage workspace.
</Info>

Integrating Statsig with MoEngage is a three-step process:

1. [Generate Authentication Credentials and Request the Integration Endpoint](/docs/partner-guide/personalize-and-optimize/experimentation/statsig#step-1-generate-authentication-credentials-and-request-the-integration-endpoint)
2. [Configure the Event Webhook in Statsig](/docs/partner-guide/personalize-and-optimize/experimentation/statsig#step-2-configure-the-event-webhook-in-statsig)
3. [Verify Events in MoEngage](/docs/partner-guide/personalize-and-optimize/experimentation/statsig#step-3-verify-events-in-moengage)

## Step 1: Generate Authentication Credentials and Request the Integration Endpoint

Before you contact MoEngage Support, decide which Statsig user identifier serves as the primary identity that maps to MoEngage profiles. You can use `userID`, `email`, a custom ID, or `stableID`.

To gather your credentials, perform the following steps:

1. On the MoEngage UI, navigate to **Settings** > **Account** > **APIs**.
2. Copy the ID under **Workspace ID (earlier App ID)**.
3. In the **API keys** section, copy the API key on the **Data** tile.

   <img src="https://mintcdn.com/moengage/rlct8DwJeWdHkWqI/images/statsig-moengage-api-keys.png?fit=max&auto=format&n=rlct8DwJeWdHkWqI&q=85&s=4039998d981f81075d0e956e30081d81" alt="The MoEngage APIs settings page under Settings and Account" width="1960" height="1060" data-path="images/statsig-moengage-api-keys.png" />

Next, contact [MoEngage Support](https://help.moengage.com/hc/en-us/requests/new) and request a dedicated Statsig webhook endpoint. Provide the following details:

| Detail                       | Description                                                                                                 |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Workspace ID**             | The ID you copied from the APIs page.                                                                       |
| **Data API key**             | The key you copied from the **Data** tile. MoEngage Support uses it to construct your webhook endpoint URL. |
| **Primary identity mapping** | The Statsig user identifier that resolves MoEngage profiles, such as `email`, `userID`, or `custom_id`.     |
| **Integration name**         | Optional. A descriptive name for the integration, such as `statsig_prod` or `feature_experiments`.          |

MoEngage Support provisions a unique webhook URL for your Statsig integration and shares it with you.

<Warning>
  Choose the primary identity carefully. MoEngage logs every exposure against the identifier you nominate, so an inconsistent choice creates duplicate profiles or merges profiles you did not intend to merge.
</Warning>

## Step 2: Configure the Event Webhook in Statsig

After MoEngage Support shares your endpoint URL, configure the webhook in Statsig. To configure the webhook, perform the following steps:

1. Log in to the Statsig console and navigate to **Settings** > **Product Configuration** > **Integrations**.

   <img src="https://mintcdn.com/moengage/rlct8DwJeWdHkWqI/images/statsig-settings-integrations.png?fit=max&auto=format&n=rlct8DwJeWdHkWqI&q=85&s=fb0d74dbd7b36ffce5b7954f562ce759" alt="The Statsig Settings menu with Integrations under Product Configuration" width="2900" height="1490" data-path="images/statsig-settings-integrations.png" />
2. Under **Your Integrations**, click the **Webhook** tile.
3. In the **Integration Name** box, type a name for the integration, such as `MoEngage`.
4. In the **Webhook URL** box, paste the MoEngage endpoint URL that MoEngage Support provisioned in [Step 1](/docs/partner-guide/personalize-and-optimize/experimentation/statsig#step-1-generate-authentication-credentials-and-request-the-integration-endpoint).
5. Click **Enable**.

   <img src="https://mintcdn.com/moengage/rlct8DwJeWdHkWqI/images/statsig-webhook-dialog.png?fit=max&auto=format&n=rlct8DwJeWdHkWqI&q=85&s=d8ea25668ad4d5b86b1702cc48b37216" alt="The Statsig Webhook dialog box showing the Integration Name and Webhook URL boxes" width="2908" height="1580" data-path="images/statsig-webhook-dialog.png" />
6. Click the **Event Filtering** tab.
7. Under **Statsig Events**, click the **Exposures** and **Custom Events** check boxes.
8. Click **Save**.

   <img src="https://mintcdn.com/moengage/rlct8DwJeWdHkWqI/images/statsig-event-filtering.png?fit=max&auto=format&n=rlct8DwJeWdHkWqI&q=85&s=0b4b994cbab9b241f6f01e9e49e181d1" alt="The Event Filtering tab showing the Statsig event categories" width="2906" height="1580" data-path="images/statsig-event-filtering.png" />

**Exposures** covers every exposure type in one check box, including feature gate, experiment, dynamic config, and layer exposures. To forward only some of them, click **View Detailed Options** and pick the ones you need.

<Note>
  Do not click **Configuration Changes**. These events record changes made in the Statsig console rather than user exposures, so MoEngage cannot map them to a user profile.
</Note>

## Step 3: Verify Events in MoEngage

To confirm that events reach MoEngage in real time, perform the following steps:

1. In the left navigation bar of your **MoEngage** account, click the target-like icon to open the **Segment** menu, and then click **Search Users**.
2. In the **Search Users** box, type your test user's identity, using the identifier you nominated in Step 1.

   <img src="https://mintcdn.com/moengage/oFFKKyfegNj2FQpM/images/nitrox-search-users.png?fit=max&auto=format&n=oFFKKyfegNj2FQpM&q=85&s=286aae3050cddc1d446eb582741fd036" alt="MoEngage search users screen" width="1688" height="910" data-path="images/nitrox-search-users.png" />
3. Open the user profile and click **Event History**.

Statsig events appear in the event history. For quick verification, look for the following key attributes:

| Attribute             | What it tells you                                               |
| --------------------- | --------------------------------------------------------------- |
| `exposure_type`       | Whether the event is a gate exposure or an experiment exposure. |
| `gate` or `config`    | The name of the feature or the configuration.                   |
| `experimentGroupName` | The variant assigned to the user, for experiment exposures.     |
| `gateValue`           | Whether the user passed the gate, either true or false.         |

This is not an exhaustive list, because the attributes vary from event to event. For the full payload that Statsig sends, refer to the [Statsig event webhook documentation](https://docs.statsig.com/integrations/event_webhook).

# Related Articles

* [Connected Sources](/docs/partner-guide/integrate-with-us/build-integration/connected-sources)
* [User Profile](/docs/user-guide/data/user-data/user-profile)
