Data design in Avo
Who is this guide useful for?
- PM’s, data experts and developers that recently got an invite to their company’s workspace in Avo and are ready to define their first events and properties
- PM’s, data experts and developers that just created a new workspace in Avo and are exploring it Avo is a fit to manage their tracking plan
What will you learn?
- How to define metrics, events and properties step by step
- The basic concepts in Avo and event design
- What to look out for when designing data
Defining a metric
We always recommend starting with the why in data design. That means thinking about your research questions, goals and metrics before your start defining your event structures. Metrics are directly tied to events in Avo and are visible in the event details. Read more about metrics, why they are useful and learn about purpose meetings in our Metrics page.
Step 1 – Open a branch in Avo
If you are making changes to your tracking plan in Avo, we always recommend creating a branch first – no matter how small your change might be. That allows you to make suggestions in isolation from the source of truth on your main branch and get feedback from your peers.
Open a new branch by clicking the icon to the right of “main” in the left sidebar. Then you are prompted to open an existing branch or creating a new one.
Example: Creating a branch in Avo
Now you should see the name of your branch instead of “main”.
Step 2 – Navigate to the metrics view
Navigate to the metrics screen by clicking “Metrics” in the “Tracking Plan” section of the left sidebar.
Example: Navigating to metrics.
Step 3 – Create a new metric
Create a metric by clicking the ”+ Add Metric” button in the top left corner. Give it a name and a description to elaborate on what the metric means.
Example: Creating a metric.
Step 4 – Add your metric to a category
We recommend organizing your metrics and events by using categories. Add your metric to a category by clicking ”+ Add to Category” below the description input. If a relevant category doesn’t already exist you can create it there and add the metric to it.
Example: Adding metric to a category.
Step 5 – Select metric type
The metric type determines how you will construct your metric in your analytics platform or raw database. The available metrics types in Avo are Funnel, Segmentation, Retention and Proportion. Read about their unique capabilities in our Metrics page.
Example: Selecting a metric type.
Step 6 – Add events
The final step of configuring your metric is to add existing or new events to your metric. This will make the metric visible in the event details of the events added, and help whoever wants to dig into your data to know exactly how this metric is defined and how they can structure it in your analytics platform.
Adding existing events to a metric
To add your existing events to a metric, you can simply click “Add Event…” and search the event library for the event that you are looking for. For all metrics you can filter on a specific property value to build your metric, and for segmentation you can select a property to group by.
Example: Adding an existing event to a metric.
Adding new events to a metric
If the user action that you want represented in your metric is not already defined as an event, you can create one from the metrics view.
In the metrics details, click “Add Event…” and start typing the name of the event you want to create. If Avo doesn’t find an event with a matching name, you will be able to create one. The name of your new event will be automatically audited by Avo (see Audit rules and configurations). Once you have created your event you can add more to the metric, or click it to configure it (see Configuring your event below).
Example: Adding a new event to a metric.
Defining and configuring events
Events are the core of event based product analytics. They are sent to your analytics platform when a user performs actions in your product. The technical structure of an event is in form of an event name and properties that further describe the user action. In addition, Avo allows you to describe events with descriptions, screenshots, variants and more. See step by step definition and configuration of an example event below.
Step 1 – Open a branch in Avo
If you are making changes to your tracking plan in Avo, we always recommend creating a branch first – no matter how small your change might be. That allows you to make suggestions in isolation from the source of truth on your main branch and get feedback from your peers.
Open a new branch by clicking the icon “main” in the left sidebar. Then you are prompted to open an existing branch or creating a new one.
Example: Creating a branch in Avo
Step 2 – Navigate to the events view
If you are not in the Events view already, click “Events” under tracking plan in the sidebar on the left.
Example: Navigating to events.
Step 3 – Create a new event
Create a new event by clicking the ”+ Add Event” button in the top left corner. Give it a name and try to follow the naming convention in your tracking plan. Avo will automatically audit the name (see Audit rules and configurations) and help you follow the casing used in your workspace.
Example: Creating a new event.
Step 4 – Configure your event
Add a description
We always recommend adding a descriptive description to every event, that describes when the event should be sent. That will help prevent discrepancies between products, platforms and code paths. Read more in our defining descriptive events and properties guide.
Add a source (required)
Add a source to your event to define where it should be sent from and in which programming language the implemented in. If you have an established workspace you probably have the sources you need already set up and can select them from the drop down that appears when you click ”+ Add Source”. If not, you might need to set up and configure your sources and destinations in the Sources view.
Example: Adding a description and sources to an event.
Add actions and properties
All events in Avo have the “Log Event” action by default, which means that a user action is logged as an event to the analytics platform. This is the most common use case and the one that we are focusing on in this guide. With the “Log Event” action you can add event properties, which allows you to attach detailed information about the action the user performed. See how to create and configure event properties in the section below.
Add variants
Event variants allow you to customize your events based on scenarios. Their main advantages are:
- enhancing the precision of the tracking plan
- narrowing the scope of tracking changes
- simplifying the implementation of Codegen
In the example below, a variant of the Purchase Completed
is created. It’s a customized view of the event for when boosters are purchased. Only them, the Booster ID
property is relevant and therefore it’s required when Product Category
is Boosters
but not attached to the event otherwise. See more example in our Event variant docs.
Add event triggers (screenshots)
Event triggers allow you to attach screenshots from your product to visually describe where events are triggered from. Triggers can be associated with a specific source if the location of the trigger looks different between sources. They can also be source independent if it is not specific to a certain source.
Add a category
We recommend organizing your metrics and events by using categories. Categories often represent product areas or journeys. Add your event to a category by clicking ”+ Add to Category” below the Actions section in the event. If a relevant category doesn’t already exist you can create it there and add the event to it.
Add a tag
Tags can be used to organize and your events further than with categories. For example if you have a product in multiple countries, you might want to tag each event with which countries are relevant for it.
Example: Adding tags and categories to an event.
Defining and configuring event properties
In this guide we’re focusing on event properties on events with the Log Event action, as that is the most common use case for beginners. There are a few more actions available as well as two other kinds of properties ( user properties and system properties).
Step 1 – Create a new event property
You can create new properties from the event details or the properties view. In this example we will create a new event property and add it to an event from the event details. First open the event you want to add it to, then click ”+ Add Event Property” under the “Log Event” section of the actions and type the name of the property that you want to create. If there is no property with the same or similar name, Avo will offer you to create a new one while automatically auditing it’s name according to your workspace’s standards. Hit enter or click create and you have created your property.
Example: Creating new event properties from event details.
Step 2 – Configure a property
Add a description
As with events, we highly recommend adding descriptions to all properties. That creates a common understanding between the data designer and those that use the data or implement it. It’s especially important to make sure the implementation is consistent across products, platforms, events and code paths as the description helps the ones that implement to know exactly what variable in their code they should assign to that property.
Select the data type
Change the data type of your property to match the one you need by clicking on where it says “String” below the description input. Then you will be able to pick from the following types:
- string: only string values are allowed
- int: only whole number values are allowed
- float: only floating point values are allowed
- boolean: only
true
orfalse
values are allowed - object: only dictionary or nested object structures are allowed (learn more in our object docs)
- any (available upon request): any data type is allowed and not type validation will occur
All of the above data types can be used with the list checkmark. That means that the property will become a list/array of the data type. For example, if the property value type string
is selected and list
checked, then the property is a list of strings: [“pants”, “socks”, “hats”]
Select the property presence
The property presence defines whether the property is required, optional or not allowed. In Avo it is described with Always sent
which means the property is required, Sometimes sent
which means it’s optional and Never sent
which means is not allowed. Presence can be configured per event and per source.
All properties are required by default and we recommend trying to keep them required in as many cases as possible. That means that the Avo developer tools will throw an error if the property is not assigned a value in development, which reduces the risk of missing data significantly. It the property is only applicable in some cases, we recommend using event variants to define each case. It’s also possible to use Sometimes sent
, but that means that the validation will not be as rigorous.
Add rules
Properties don’t have any rules by default, but we recommend setting rules that match the limitation of the possible values for every property.
- String rules: you can pick exactly which string values are allowed for your property. We recommend doing so for all string properties that have a limited number of allowed values. String rules can be configured per source and event.
- Int and Float rules: Numerical properties can have rules that limit the value to a range between a minimum and maximum value. We recommend to set a min and max where relevant, for example to prevent negative values for count properties.
Example property configurations
Below is an example of a pretty simple numerical property definition:
Example: Configuring a new numerical property.
Below is an example of a string property with presence depending on source and string rules varied per source.
Step 3 – Add existing event property to an event
We always recommend everyone that design data to first look into the existing events and properties to see if there are any that are relevant for your use case.
To add an existing event property to your event, click ”+ Add Event Property” under in the “Log Event” section of the actions and start typing the name of the property to search for it in the property library. If you don’t know the name of your property, you can also scroll down to find it. Once you have found your property, click it’s name and it’s added to your event.
Example: Adding an existing property to an event.
Step 4 - Create and add property bundle to an event
Event property bundles is a way to bundle related properties that are often added to events together to make it faster and more consistent to add those properties to events.
In the example below we create the Product property bundle with all the product properties that should go together on events, preventing us from sometimes forgetting the Product Price
property for example. Property bundles are created in the “Properties” page and added to events the same way as event properties, by clicking ”+ Add event property” under the “Log Event” action.
Example: Creating and adding a property bundle to an event.
What’s next?
Now that you know how to define and maintain your metrics and events in Avo, it’s time to learn how to review branch changes and request implementation. If you haven’t set up your sources and destinations yet, now is a good time to learn how sources and destinations are defined.