|
| 1 | +--- |
| 2 | +title: Statsig Destination |
| 3 | +--- |
| 4 | + |
| 5 | +[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. |
| 6 | + |
| 7 | +This destination is maintained by Statsig. For any issues with the destination, [contact the Statsig Support team ](mailto:[email protected]). |
| 8 | + |
| 9 | +## Getting Started |
| 10 | + |
| 11 | +{% include content/connection-modes.md %} |
| 12 | + |
| 13 | +1. From the Destinations catalog page in the Segment App, click **Add Destination**. |
| 14 | +2. Search for “Statsig” in the Destinations Catalog, and select the “Statsig” destination. |
| 15 | +3. Choose which Source(s) should send data to the “Statsig” destination. |
| 16 | +4. Go to the [Statsig dashboard](https://console.statsig.com/api_keys), find and copy the Statsig "Server Secret Key”. |
| 17 | +5. Enter the Statsig “Server Secret Key” in the “Statsig” destination settings in Segment. |
| 18 | + |
| 19 | +## Supported methods |
| 20 | + |
| 21 | +Statsig supports the following methods, as specified in the [Segment Spec](/docs/connections/spec). |
| 22 | + |
| 23 | +### Page |
| 24 | + |
| 25 | +Send [Page](/docs/connections/spec/page) calls to Statsig. For example: |
| 26 | + |
| 27 | +```js |
| 28 | +analytics.page("Home") |
| 29 | +``` |
| 30 | + |
| 31 | +Segment sends Page calls to Statsig as: |
| 32 | + |
| 33 | +```js |
| 34 | +{ |
| 35 | + "event": "segment_page:Home" |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +These events are included in any experiments running on Statsig and will show up in all Metrics data. |
| 40 | + |
| 41 | +### Screen |
| 42 | + |
| 43 | +Send [Screen](/docs/connections/spec/screen) calls to Statsig. For example: |
| 44 | + |
| 45 | +```obj-c |
| 46 | +[[SEGAnalytics sharedAnalytics] screen:@"Home"]; |
| 47 | +``` |
| 48 | +
|
| 49 | +Segment sends Screen calls to Statsig as: |
| 50 | +
|
| 51 | +```js |
| 52 | +{ |
| 53 | + "event": "segment_screen:Home" |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +These events are included in any experiments running on Statsig and will show up in all Metrics data. |
| 58 | + |
| 59 | +### Track |
| 60 | + |
| 61 | +Send [Track](/docs/connections/spec/track) calls to Statsig. For example: |
| 62 | + |
| 63 | +```js |
| 64 | +analytics.track('Login Button Clicked') |
| 65 | +``` |
| 66 | + |
| 67 | +Segment sends Track calls to Statsig as: |
| 68 | + |
| 69 | +```js |
| 70 | +{ |
| 71 | + "event": "segment_track:Login Button Clicked" |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +These events are included in any experiments running on Statsig and will show up in all Metrics data. |
0 commit comments