Dashboards
Charts
Example
4min
our task is to create a chart of daily email logs we store all email logs in the 'email logs' cms object in the logs, we have the statuses of each sent email (sent email was sent, open email was opened, etc ) our goal is to create a chart that shows how many email statuses we have each day first, we need to create a new dashboard we will name it email chart then we need to add a chart first, we need to decide what type of chart will be best for us i will use a spline chart before selecting a type of chart we need to select an entity in which the logs are stored in our case it`s 'email logs' in the metrics section, we need to select a 'count unique values' metric we need to count only unique logs because the customer can open one email multiple times, and if we count that in we won`t see the correct rate at which our customers are opening emails from us we will select an email id property as a unique value (it`s the same for each duplicate log) then we need to set up the aggregation first, we set the daily aggregation this will show how many logs are created each day in the 'aggregation' we should select 'date histogram' select 'create date' in the property selection because we want to have a daily statistic, we need to select 'day' in the minimum interval now we have the count of logs that are created each day, but we still can`t see the statuses of logs to display statuses on the chart we should add a sub aggregation we should select 'terms' in the aggregation setting because we need to aggregate the chart by email statuses in the property section, we will select 'status' order and count can be ignored in this case (you need to raise 'count' if you have more than 10 different statuses) our chart will look like that now we have a separate graph for each status if we want to check logs for only one month, we can specify the start and end date, then click save