Metrics
This page explains different ways to understand and measure the audience of an event using different metrics.
To better breakdown and understand the audience of an event, charts based on different metrics can be added. These chart show histograms on various metrics and these metrics are configured in the metric_categories.json file.
Trigger templates are grouped into named categories based on their business logic as shown below:
{
"categories": [
{
"icon": "fa-phone",
"name": "Voice call metrics",
"metrics": [
{
...
},
{
...
}
]
},
{
"icon": "fa-money",
"name": "Recharge metrics",
"metrics": [
{
...
},
{
...
}
]
}
}
Elements inside the metrics are different metric , we will try learn how
to configure metrics by examples.
metrics categories are configured in
etc/model/campaigns/metric_categories.json file.
The Metric charts prepared from Profile Attributes Sourced metrics gets data from profiles and histograms are produced from profile values of each subscriber.
Example Configuration:
{
"dataType": "String",
"metricId": "gender",
"minimumBucketSize": 50,
"name": "Gender",
"profileAttributeSource": {
"name": "gender"
}
}
profileAttributeSourceselects a profile attribute on which histograms needs to be produced.nameis name of metric.dataTypeis data type of X-Axis.metricIdis unique name of metric.minimumBucketSizeis the minimumBucketSize of histograms.
The Metric charts prepared from Aggregate Sourced metrics gets data from aggregate and histograms are produced from aggregate values buckets of each subscriber.
Example Configuration:
{
"icon": "fa-money",
"metrics": [
{
"aggregateSource": {
"groupByAttributes": [
{
"name": "MSISDN"
}
],
"name": "topupAmountBySubscriber"
},
"dataType": "Currency",
"metricId": "topupAmount",
"minimumBucketSize": 300,
"name": "Topup Amount"
}
],
"name": "Recharge metrics"
},
aggregateSourceas this metric get data from an aggregate.aggregateSource.groupByAttributesthe group by attribute to be passed.aggregateSource.nameis the name of aggregate.