Events
Structure
All events in EnaLog have the following structure. Some data is required for every event and some is optional.
Data | Required | Description |
Project | Yes | The name of the project that you want this event to belong to in |
Name | Yes | The name of the event you want to send to EnaLog in slug format. For example an event called User Subscribed would be user-subscribed |
Description | No | OPTIONAL description of the event |
Icon | No | OPTIONAL emoji to associate with the event |
Push | Yes | Boolean (true or false) whether you want the event to be pushed to your mobile device (mobile apps are coming soon) |
Tags | No | OPTIONAL array / list of strings you would like to associate with the event |
Meta | No | OPTIONAL object of key / value pairs of any other data you would like to pass to the event |
Channels | No | OPTIONAL object of key / value pairs which set which channels to send this event to |
User ID | No | OPTIONAL string of your User ID - could be internal ID or email. Request key should be user_id |
What is the difference between Tags and Meta?
From a technical perspective the only difference is their structure, tags are an array / list and meta is an object of key value pairs.
But tags and meta can be used differently in EnaLog, tags can be used to create metrics, graphs and funnels by grouping events and meta can be used to provide extra data to a single instance of an event.
An example
For example, say you have an onboarding process in your SaaS that consists of three steps after signup:
- Create your team
- Invite your team members
- Create your first app
Tags
Let's see how we can use tags in this scenario. For the first step you push an event to EnaLog called 'user-created-team', for the second event 'user-invited-team-members' and for the third event 'user-created-app'. All of these events are part of your onboarding process so you may want to pass a tag called 'onboarding' which could be used to create a graph or funnel in the EnaLog UI to chart and visualise your onboarding process.
Meta
Now let's look at how we could use meta data in this scenario. So you've assigned the onboarding tag but you want to be able
to track users across your whole app, you could pass a key value pair to the meta object called user_id: <users-id>
where the users
ID is the ID you store for the user in your database. This would allow you to view all the events that any specific user triggers in
your SaaS.