How to create events¶
There are two steps when defining new events: 1. Creating the event definition 2. Implementing the event
(1) Creating the event definition¶
Usually done by a tracking analyst or with their help.
1. Copy-paste the 0_Template.md file inside the EventList folder
2. Rename the pasted file as ID_EventName.md
(e.g. 1_Registration.md
)
3. Open the newly created file and modify/add the fields as required by your event
(2) Implementing the event (client)¶
- Create a
struct
that implements bothIComponentData
andITrackingEventId
- Name the file as the event itself
EventNameEvent.cs
(e.g.RegistrationEvent.cs
) - Implement the Id that is defined in the event list document
- Add the fields that are not provided by default (generally speaking, those fields that are new in comparison to the 0_Template.md)
- Implement the handling of this new event type on your specific company event handler, to read and send the data to the tracking servers.
- Create the entity with the component in the part of code where relevant (e.g. create a new entity with the given
RegistrationEvent
component after performing the registration on the client)