Read time: 2 minutes
Last edited: Jul 29, 2022
This topic explains analytics events, how SDKs send them to LaunchDarkly, and what features they are generated for.
All SDKs send analytics events to LaunchDarkly as a result of feature flag evaluations and certain SDK calls. There are several kinds of analytics events.
Here is a list of analytics event kinds and their functions:
summaryevents describe a set of individual feature evaluations over an interval.
featureevents include additional feature flag evaluation details for flags used in Experimentation and flags you enable detailed tracking for.
debugevents describe feature flag evaluations when debugging mode is on.
identifyevents push user data to LaunchDarkly.
aliasevents associate two users for analytics purposes.
customevents are sent when an application calls the SDK's track method.
Analytics events are crucial to the functioning of several features in LaunchDarkly.
For analytics events to reach LaunchDarkly, your network must be allowed to send events. Ensure that event streaming endpoints,
events.launchdarkly.com, are on your allow list. To learn more about how SDKs send events, read Recording events.
Here is a list of LaunchDarkly features that rely on analytics events:
All LaunchDarkly SDKs automatically send pending analytics events to LaunchDarkly at regular intervals. This is called a flush interval. The buffer between flushes prevents the SDK from having to send constant network requests, and varies by SDK. By default, server-side SDK buffer time is usually a few seconds, and mobile SDK buffer time is around 30 seconds. A longer buffer time for mobile SDKs helps preserve the device's battery life, and events do not need to be flushed as often because events build up much more slowly for client-side SDKs with only one user.
You can configure your SDK's buffer time between flushes. To learn how, read Configuration.
You can manually call flush to send events immediately without waiting for the next interval. Most customers do not need to use the manual flush feature, but it can be useful if you test the SDK in a simulator. To learn how, read Flushing events.
You will not need to manually shut down your SDK in most situations. However, if your app dies while there are still events in the buffer, the SDK discards them. If you know your application is about to terminate, or if you're testing an app, you should manually shut down the LaunchDarkly client before quitting to ensure it delivers any pending analytics events to LaunchDarkly. To learn how, read Shutting down.
You can disable SDKs from sending events for testing purposes. To learn more, read Managing test data in your production environment.
You can disable SDKs from sending events, but we strongly recommend against it outside of testing purposes. Many LaunchDarkly features will not work correctly if they do not regularly receive analytics events.