LaunchDarkly Developer Documentation

Get started in under 30 minutes.
LaunchDarkly provides feature flags as a service for Java · Python · Ruby · Go · Node.js · PHP · .NET. Control feature launches -- who sees what and when -- without multiple code deploys. Easy dashboard for phased rollouts, targeting and segmenting.
Need more help? write us at support@launchdarkly.com

Get Started    Guides

Analytics data stream (ADS)

Available to enterprise customers

The Analytics data stream (ADS) is only available to certain customers on our enterprise plans. If you're interested in learning more about our enterprise plans, contact sales@launchdarkly.com.

The Analytics data stream (ADS) provides a real-time stream of raw analytics data, including feature flag requests, analytics events, custom events, and more.

Connecting to the ADS

The ADS uses the Server-sent events protocol. If the API is enabled for your account, you can access the stream by connecting to firehose.launchdarkly.com with any HTTP client. For example, here's how to connect to the stream using cURL:

curl -H "Authorization: <Your Environment's SDK Key>" -H "Accept: text/event-stream" https://firehose.launchdarkly.com

The SDK keys for your environments are found here

Client libraries for server-sent events exist for many platforms. Here are some libraries we recommend:

Events payload

The stream will contain standard server-sent event payloads. The event name will be put, and the data will be a JSON payload consisting of an array of events. For example

event: put
data: [{"creationDate":1.467145812601e+12,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f","kind":"identify","user":{"anonymous":true,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"}}]

event: put
data: [{"creationDate":1.46714581449e+12,"key":"54ac2ec7de674204ddd610a5","kind":"click","url":"http://sandbox.launchdarkly.com/","user":{"anonymous":true,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"}},{"creationDate":1.467145813187e+12,"key":"hover","kind":"custom","url":"http://sandbox.launchdarkly.com/","user":{"anonymous":true,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"}}]

event: put
data: [{"creationDate":1.467145815597e+12,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f","kind":"identify","user":{"anonymous":true,"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"}}]

event: put
data: [{"creationDate":1.467145811197e+12,"key":"sort.order","kind":"feature","user":{"anonymous":true,"custom":{"groups":null},"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"},"value":true},{"creationDate":1.467145811416e+12,"key":"image.hover","kind":"feature","user":{"anonymous":true,"custom":{"groups":null},"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"},"value":false},{"creationDate":1.467145814799e+12,"key":"alternate.page","kind":"feature","user":{"anonymous":true,"custom":{"groups":null},"key":"3ea13b3b-6bb9-4237-8fb9-6a182d4c1e5f"},"value":true}]

The Analytics Data Stream Reference contains more details on event kinds and their schemas.