# mParticle

## How the mParticle integration works

Enabling the [mParticle](https://www.mparticle.com/) integration for Statsig allows Statsig to receive events from mParticle.

You can find all events that Statsig receives from mParticle in the [Metrics](https://docs.statsig.com/metrics/introduction) tab in the Statsig console. Statsig automatically includes these events in [Pulse](https://docs.statsig.com/experiments/interpreting-results/read-results) and [Experiment](https://docs.statsig.com/experiments/monitor) results for your feature gates and experiments.

## Configuring incoming events

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

1. From the [API Keys](https://console.statsig.com/api_keys) tab in the Statsig console, copy the Statsig `Server Secret Key`.
2. Use your Statsig `Server Secret Key` to configure a Statsig Event Integration through mParticle's integrations directory.

### Mapping user IDs

To associate your mParticle events with your Statsig Feature Gates or Experiments, use mParticle's [IDSync framework](https://docs.mparticle.com/guides/idsync/introduction/) to ensure your mParticle events pass along the same user IDs used with the Statsig SDK.

## Configuring outbound events

To export your Statsig events to mParticle:

1. Go to your mParticle account and choose `Setup` then `Inputs` on the left-hand column to start configuring your integration.
   {% figure %}
   <img src="https://docs.statsig.com/images/integrations/data-connectors/mparticle/155385379-f111a536-d8e4-4ca6-ad37-47d926c254b9.png" width="200px" alt="mParticle navigation drawer highlighting the Setup to Inputs path" />
   {% /figure %}

2. Click on the `Feeds` tab within the page that loads, click on `Add Feed Input` button, and then search for `Statsig` and click on the option.
   {% figure %}
   <img src="https://docs.statsig.com/images/integrations/data-connectors/mparticle/155385384-b75e327d-96e8-49fc-8cb0-07516f5d3c79.png" alt="Add Feed Input dropdown with Statsig option selected" />
   {% /figure %}

3. Provide a name for your `Statsig Feed` and click `Save`.
   {% figure %}
   <img src="https://docs.statsig.com/images/integrations/data-connectors/mparticle/155385386-aa982102-63ff-4f1a-905d-9889684cf3ae.png" width="400px" alt="Statsig feed configuration form showing name field and active toggle" />
   {% /figure %}

4. Copy the `Server to Server Key` and `Server to Server Secret` for the next step.

5. Log into the Statsig console and navigate to the [**Integrations**](https://console.statsig.com/integrations) page.

6. Click on the `mParticle` card and switch to the `Outbound` tab. Paste the `Server to Server Key` and `Server to Server Secret` in their respective boxes and **Enable** the integration.
