Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Statsig Source


Source Info
  • The Statsig Source is an Event Cloud source. This means that it sends data as events, which are behaviors or occurrences tied to a user and a point in time. Data from these sources can be loaded into your Segment warehouses, and also sent to Segment streaming destinations. Learn more about cloud sources.

Statsig(link takes you to an external page) 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 serves all your experimentation needs with a unified platform that connects what you build with the impact you deliver. Statsig powers A/B tests and experiments on any device, in any part of the application stack, at any scale. Statsig gives you a comprehensive 360° view of how your product is performing.

The Statsig integration enables custom events and exposure events to be forwarded from Statsig to Segment without any additional work on the client — this is a pure server-to-server integration.

This is an Event Cloud Source which can not only forward data into your Segment warehouse, but they can also federate the exported data into your other enabled Segment Destinations.

This source is maintained by Statsig. For any issues with the source, contact their Support team.


Getting Started

getting-started page anchor
  1. From the Segment dashboard, navigate to Catalog and search for Statsig on the Sources tab.
  2. Click the Statsig tile, and then click on the blue Add Source button.
  3. Name the instance of this source and click Add Source.
  4. Locate your Write Key on the Source Overview page and copy it.
  5. Log into the Statsig console and navigate to the Integrations(link takes you to an external page) page. Click the Segment card.
  6. Click the Outgoing tab. Paste the Write Key captured on step #4 and click Enable.
  7. Now, configure how data should be mapped and which events to include. The "Event Filtering" screen allows you to select which events and event types Statsig sends to Segment. The "Map Identifiers" configuration will map Statsig identifiers to a corresponding Segment allocation of your choice. Press Confirm and you'll see an "Integration Updated" dialogue.
  8. Within a few minutes, you can observe your Statsig events being ingested in Segment within Segment's Event Debugger.

The table below lists events that Statsig sends to Segment. These events appear as tables in your warehouse, and as regular events in other Destinations. Statsig will include the userId if available.

(information)

Info

More details on event payloads can be found in Statsig's documentation(link takes you to an external page).

EventDescription
statsig::config_exposureUser was exposed to a set of configuration values
statsig::experiment_exposureUser was exposed to an experiment
statsig::gate_exposureUser was exposed to a gate
custom_eventAny custom event name tracked

The table below lists the properties included in the events listed above.

(information)

Info

More details on event payloads can be found in Statsig's documentation(link takes you to an external page).

Property NameDescription
eventName of the event
userIdID of the user (may not always be present)
emailEmail of the user
anonymousIdAn anonymous identifier, typically the Statsig stableID. This can be controlled in the Statsig Map Identifiers configuration.
properties.metadataAny other contextual event metadata
properties.valueValue associated with the event
originalTimestampTimestamp the event was triggered
receivedAtTimestamp the event was received

Now that your Source is set up, you can connect it to Destinations.

Log into your downstream tools and check to see that your events appear as expected, and that they contain all of the properties you expect. If your events and properties don't appear, check the Event Delivery tool, and refer to the Destination docs for each tool for troubleshooting.

If there are any issues with how the events are arriving to Segment, contact the Statsig support team.