Skip to content

Track evaluation analytics custom events #6875

@Zaimwa9

Description

@Zaimwa9

To be scoped

Alpha state

The evaluation analytics pipeline is functional in alpha (@flagsmith/flagsmith@internalv11.0.0). Currently we track flag evaluations triggered on every hasFeature() / getValue() call emits an event with data available at evaluation time

We need to define the scope and the behavior of tracking custom events as it's been discussed.

Right now the event schema looks like:

interface IPipelineEvent {
      event_id: string; => flag key
      event_type: 'flag_evaluation' | 'custom_event'; => will hold the custom event
      evaluated_at: number;
      identity_identifier: string | null;
      enabled?: boolean | null;
      value: IFlagsmithValue;
      traits?: { [key: string]: null | TraitEvaluationContext } | null;
      metadata?: Record<string, any> | null;
  }

Open questions

  • Do we want to provide a generic trackEvent method that allows end user to track any event he wants
  • How do we tie flag evaluations with a custom event to stay in feature flagging territory?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions