launchdarkly / js-client-sdk

LaunchDarkly Client-side SDK for Browser JavaScript
Other
113 stars 66 forks source link

Add support to always track feature events #179

Closed edvinerikson closed 5 years ago

edvinerikson commented 5 years ago

Is your feature request related to a problem? Please describe. We want to track all feature evaluations by default, currently its only possible to configure this through the LD UI per flag basis.

Describe the solution you'd like Add a new config option trackEvents: booleanin the SDK init that allows us to always generate the feature event. https://github.com/launchdarkly/js-client-sdk/blob/master/packages/launchdarkly-js-sdk-common/src/index.js#L172

Describe alternatives you've considered We've considered forking the event collector, but I feel that its a lot of code to maintain cross SDK vs just adding the option here.

Additional context We will also need the same option in the java server, node server and node client SDK.

eli-darkly commented 5 years ago

The place to configure this isn't on the SDK side, but on the dashboard. If you look at the form that comes up when you click Edit for an environment in Settings, there's this option:

image

That turns on full event tracking for all flags in the environment by default. Or have I misunderstood what you're asking for?

edvinerikson commented 5 years ago

Missed that, thanks 👍