Learn more about the behavior and calculation logic behind the different Metric Types in Databox.
IN THIS ARTICLE
Why do we need multiple Metric Types?
To accommodate the varying levels of data detail provided by APIs (Application Programming Interfaces), we have categorized our Metrics into different "Types" depending on how they are calculated. This allows them to be used seamlessly across our products and accurately display relevant numbers based on the selected Date Range.
The Metric Type affects several aspects of how data is visualized, including the Date Range, granularity, and availability of historical data.
What Metric Types are supported by Databox?
There are currently four types of Metrics in Databox: Current, Event, General, and Calculated. These types cannot be switched or converted from one to another. The Metric Type is typically determined by how the API provider serves data, which means we have limited control over how a Metric is calculated.
Current Metrics
This Metric Type is assigned to Metrics that are offered by the API provider as a cumulative or current total value, usually without any granularity (daily, weekly, etc.) or the ability to retrieve historical data.
Databox will store the value received from the API and link it to the time it was synced. As time goes on, a historical record for that Metric will be generated in Databox, enabling you to visualize how the Metric has evolved over time.
For instance, when you use the Metric Followers from the LinkedIn Company Pages integration, it will display the total number of followers you have accumulated. Initially, you will see just one value that represents the current total count. However, as time goes on and more data syncs are made, you will be able to track how the number of followers has changed over the course of a period.
When you choose a Date Range in Databox, the system will automatically display the most recent value for the Metric within that selected period. For example, if today is December 13th and you choose Last Month as the Date Range, the value shown will be the one received during the last sync on November 30th.
Pro Tip: To ensure that Current Metrics are regularly updated, it is important to have them actively used within Databox products. This can be achieved by adding them to your Metrics screen, incorporating them into a Scorecard, setting up Alerts for them, or including them in a Databoard. By doing so, Databox will sync the data for these Metrics on a regular basis, allowing you to have the most up-to-date information for reporting and analysis.
Event Metrics
In many cases, API providers do not offer pre-calculated values that can be directly used. As a result, we have to calculate these values ourselves by counting the number of entities returned or applying a specific formula or algorithm to the raw data in order to obtain the desired Metric.
Each entity received will be stored in our database as a separate entry, and each entry will have its own timestamp associated with it.
For example, let's consider the Calls Metric from the HubSpot CRM integration. When we sync data for this Metric, we keep track of the number of calls logged within a period, as well as their corresponding timestamps. When you choose a new Date Range in Databox, our system will calculate the total number of calls that exist in our database within that specific period.
Since we have a separate record for each individual entity returned by the API, we can accurately calculate the total count for any period and granularity within that period without any limitations.
The available range of granularities for visualization will vary depending on the selected Date Range, and vice versa, due to constraints in the visualization itself. For example, displaying Year to Date data on an hourly basis would result in a graph with up to 8,760 data points, which is not feasible.
General Metrics
This Metric Type does not represent the total number of entities or the count of individual data points. Instead, it provides summarized values that have a defined start and end period. These periods are usually determined by restrictions set by the API provider, so we are required to use them as they are. We may also create these periods ourselves to make it simpler to visualize data across different Date Ranges and granularities.
These metrics make up the majority of the metrics available in Databox. Each entry in our database represents a specific period, typically a day. When you select a Date Range, our system retrieves all the entries that fall within that range. We then perform further calculations and aggregations based on the chosen visualization and granularity.
However, there are cases where data cannot be further aggregated due to potential discrepancies. For example, when tracking New Users from Google Analytics 4, a new user can be registered by Google multiple days in a row. If we were to aggregate the daily values for this metric, it would result in a higher total than requesting data from Google for the exact start and end period. Therefore, such metrics are always synced using the Date Range selected in the visualization.
Calculated Metrics
These are Metrics whose values cannot be directly obtained by the API provider. A Calculated Metric is always paired with a Current Metric, using the values from the Current Metric to generate its own values. This is achieved by calculating the difference between the previously stored value and the new value received during the current sync for the paired Metric.
Paired Metrics in Databox have the same name but differ in their prefix. A notable example is the New Followers Metric from Instagram Business, which is paired with the Total Followers Metric. When syncing data for "New Followers," our system calculates the difference between the latest and current values of "Total Followers" provided by the API, and saves it as the value for the "New Followers" Metric. This opens up new opportunities for generating reports on the total number of new followers gained on Instagram, which is unfortunately not provided by Meta in their API.