Event types

You can create event types in your schema to log analytics events that you want to track, e.g.

input PurchaseEvent @event  {
  context: Context!
  revenueAmount: Int!
}

The fields on the event type, e.g. context and revenueAmount are included in the event payload.

Logging events

To log events, create a Void flag in your schema as an event trigger, e.g.

type Root {
  purchase: Void!
}

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

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