Event types

To log analytics events, first define event types in your schema. Each event you log will include all of its fields in the payload.

By default, new event types include your top-level context, but you can include whatever fields you like.

Logging events

To log events, create an event trigger in your schema, e.g.

Then insert a Log Event expression in your flag logic. Select the event type you want to log from the dropdown and finally set the payload for it.

Note that when you create an event trigger, a matching event is automatically created in your schema.

To capture additional data not included in your top-level context, add fields as arguments to your event trigger via the GraphQL schema editor and then add them to your logic.

type Root {
  purchase(revenueAmount: Int!): Void!
}

An event is logged when you evaluate this flag in your code.

Viewing event counts

To view event counts and drop-off rates between different event types, build a funnel.

Last updated