Events
Last updated
Last updated
To log analytics events, first create event types in your schema. All fields of the event will be captured in its payload, e.g.
By default, new event types include your top-level context
, making it easy to capture its data. However, you can remove the context
field and only include the necessary fields. For example, you can choose to log only organization-specific data without capturing user-specific data, ensuring that you don’t inadvertently log sensitive data.
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 too, streamlining the setup process.
To capture additional data not included in your top-level context
, you can add fields as arguments to your event trigger via the GraphQL schema editor and then combine these new fields with existing context
fields as appropriate in your event trigger logic.
An event is logged when you evaluate this flag in your code.
To view event counts and drop-off rates between different event types, build a funnel.