To help decide what events and properties are needed to measure the success of your feature, it is useful to start by defining a metric in Avo. The added benefit of documenting metrics in context of your events is knowing what metrics are effected by changing this event. Read more in our documenting downstream dependencies guide.
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 three line icon beside where it says "main" in the left sidebar. Then you are prompted to open an existing branch or creating a new one.
Example: Opening a branch in Avo
Navigate to the metrics tab by clicking "Tracking Plan" and then "Metrics", which lives under the Tracking Plan.
Example: Navigating to metrics.
Create a metric by clicking the "+ Add Metric" button. Give it a name and a description to elaborate on what the metric means.
Example: Creating a metric.
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, first create a new one by clicking "+ Add Category" next to the "+ Add Metric" button, and then add your metric to the category.
Example: Adding metric to a category.
The metric type determines how you will construct your metric in your analytics platform or raw database. Different metric types have different capabilities:
Example: Selecting a metric type.
The final step of configuring your metric is to add existing or new events to your metric. This will 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.
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.
If the user action that you want represented in your metric is not already defined in an event, you can create one from the metrics view.
In the metrics view, click "Add Event..." and start typing the name of the event you want to create. Instead of selecting an existing event from the drop down, hit enter and create a new one. The name editor will pop up and you can edit the spelling or casing using the naming assistant. Once you have created your event, you can configure it (see Configuring your event below) or continue adding events to your metric and configure later.
Example: Adding a new event to a metric.
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 three line icon beside where it says "main" in the left sidebar. Then you are prompted to open an existing branch or creating a new one.
Example: Opening a branch in Avo
Navigate to the events tab by clicking "Tracking Plan" and then "Events", which lives under the Tracking Plan.
Example: Navigating to metrics.
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. The Avo naming assistant will help you follow the casing used in your workspace.
_Example: Creating a new event._We always recommend adding a descriptive description to every event, that describes when the event should be sent. That will help prevent discrepancies between platforms and code paths. Read more in our defining descriptive events and properties guide.
Add a source to your event to define where it should be sent from and in which programming language the tracking code will be generated 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 tab.
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, add and configure event properties in the section below.
We recommend organizing your metrics and events by using categories. 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, first create a new one by clicking "+ Add Category" next to the "+ Add Event" button, and then add your metric to the category.
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: Configuring an event.
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).
To create a new event property and add it to an event, 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. Then click "Create New Property" and review and confirm the name of the property in the naming editor that pops up. As with event names, the naming assistant will help you follow the casing in your workspace and prevent duplicate property names. Now you have created a new event property and added it to your event.
Example: Creating a new event property for an event.
As with event, we highly recommend adding descriptions to all properties. That helps the ones that implement to know exactly what variable in their code they should assign to that property.
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:
true
or false
values are allowedAll properties are required by default and we recommend trying to keep them required in as many cases a possible. That means that the Avo developer tools will throw and error if the property is not assigned a value in development, which reduces the risk of missing data significantly. You can however set a property to be optional by checking the "Optional" check box beside the data type, if it's not always relevant to send a value for that property.
Properties don't have any rules by default, but we recommend setting rules that match the limitation of the possible values for every property.
Example: Configuring a new property.
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.
Now you know how to define and maintain your metrics and events in Avo and it's time to learn how to manage sources and destinations.