Non-aggregatable metrics

Versions 3.0+ of the Push API support sending metric values to specific periods of time, using from – to timestamps. 

If you want to create non-aggregatable (or unique) metrics, like for Churn Rate, Unique Visitor, etc., you need to store exact metric values for specific periods of time. Since such metrics cannot be aggregated, we simply can’t sum or take an average of daily values to display the monthly value. If you want to see the value for a Date Range, unique values need to be stored for each Date Range.

You can define these periods with the ‘periodFrom‘ and ‘periodTo‘ Date/Time.

  • cURL
  • PHP
  • JavaScript
  • Ruby
  • Java
  • Go
  • Python
curl \
-u 2cdt4yoytbvockc51cowgs4gsss84ow4s: \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.databox.v2+json' \
-d '{
    "$conversion_rate" : 0.09,
    "periodFrom" : '2021-03-01 00:00:00',
    "periodTo" : '2021-03-16 00:00:00'
// Not supported yet
// Not supported yet
# Not supported yet
// Not supported yet
// Not supported yet
# Not supported yet

In the example above, we send the Conversion rate of 9% (metric value: 0.09) formatted as a ‘Percentage’ for the period of March 1, 2021 (midnight) to March 16, 2021 (midnight). By selecting this same Date range on a Databoard, we will see this same metric value.