# Statsig Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Statsig** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

[Statsig](https://www.statsig.com/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) helps companies safely A/B test features in production before rolling them out, avoiding product debates and costly mistakes when shipping out new features. Statsig automates the grunt work so that A/B tests are always running automatically and you always know how your features are performing.

This destination is maintained by Statsig. For any issues with the destination, [contact the Statsig Support team](mailto:support@statsig.com).

## Getting Started

1. From the Destinations catalog page in the Segment App, click **Add Destination**.
2. Search for "Statsig" in the Destinations Catalog, and select the "Statsig" destination.
3. Choose which Source(s) should send data to the "Statsig" destination.
4. Go to the [Statsig dashboard](https://console.statsig.com/api_keys), find and copy the Statsig "Server Secret Key".
5. Enter the Statsig "Server Secret Key" in the "Statsig" destination settings in Segment.

## Supported methods

Statsig supports the following methods, as specified in the [Segment Spec](/docs/segment/connections/spec).

### Page

Send [Page](/docs/segment/connections/spec/page) calls to Statsig. For example:

```js
analytics.page("Home")
```

Segment sends Page calls to Statsig as:

```js
{
  "event": "segment_page:Home"
}
```

These events are included in any experiments running on Statsig and will show up in all Metrics data.

### Screen

Send [Screen](/docs/segment/connections/spec/screen) calls to Statsig. For example:

```objc
[[SEGAnalytics sharedAnalytics] screen:@"Home"];
```

Segment sends Screen calls to Statsig as:

```js
{
  "event": "segment_screen:Home"
}
```

These events are included in any experiments running on Statsig and will show up in all Metrics data.

### Track

Send [Track](/docs/segment/connections/spec/track) calls to Statsig. For example:

```js
analytics.track('Login Button Clicked')
```

Segment sends Track calls to Statsig as:

```js
{
  "event": "segment_track:Login Button Clicked"
}
```

These events are included in any experiments running on Statsig and will show up in all Metrics data.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Statsig  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field   | Description                                                                                             | Required | Type   |
| ------- | ------------------------------------------------------------------------------------------------------- | -------- | ------ |
| API Key | Copy the Statsig Server Secret Key for your Statsig Project here: https://console.statsig.com/api\_keys | Yes      | string |
