Retrieve Customer Count

Retrieves the number of active customers, for the specified time period.

Examples
curl -X GET "https://api.chartmogul.com/v1/metrics/customer-count" \
     -u YOUR_API_KEY: \
     -d start-date=2015-07-01 \
     -d end-date=2015-11-01 \
     -d interval=month
ChartMogul::Metrics.customer_count(start_date: '2015-07-01', end_date: '2015-11-01', interval: 'month')
ChartMogul.Metrics.customerCount(config, {
   'start-date': '2015-07-01',
   'end-date': '2015-11-01',
   'interval': 'month'
}, function (err, res) {
   // asynchronously called
});
<?php

ChartMogul\Metrics::customerCount([
    "start-date" => "2015-07-01",
    "end-date" => "2015-11-01",
    "interval" => "month",
]);
?>
api.MetricsRetrieveCustomerCount(&cm.MetricsFilter{
        StartDate: "2016-01-01",
        EndDate:   "2016-03-12",
        Interval:  "month",
    Geo:             "GB",
    Plans:       "PRO Plan",
    })
chartmogul.Metrics.customer_count(
    config,
    start_date="2016-01-01",
    end_date="2016-03-12",
    interval="month",
      geo="GB",
        plans="PRO Plan")
Result Format
{
  "entries":[
    {
      "date":"2015-07-31",
      "customers":382
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":382,
    "previous":379,
    "percentage-change":0.8
  }
}
#<ChartMogul::Metrics::CustomerCounts:0x007fa4ec4605d0 
@entries=[
  #<ChartMogul::Metrics::CustomerCount:0x007fa4ec4602d8 
  @date=2015-07-31, 
  @customers=382
  >,
  <...more entries...>
], 
@summary=
  #<ChartMogul::Summary:0x007fa4ec45a338
  @current=382,
  @previous=379,
  @percentage_change=0.8
  >
>
{
  "entries":[
    {
      "date":"2015-07-31",
      "customers":382
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":382,
    "previous":379,
    "percentage-change":0.8
  }
}
<?php

ChartMogul\Metrics\CustomerCounts::__set_state(array(
   "entries" => 
  Doctrine\Common\Collections\ArrayCollection::__set_state(array(
     "elements" => 
    array (
      0 => 
      ChartMogul\Metrics\CustomerCount::__set_state(array(
         "date" => "2015-07-31",
         "customers" => 382,
      )),
      1 => 
      ChartMogul\Metrics\CustomerCount::__set_state(array(
         "date" => "2015-08-31",
         "customers" => 382,
      )),
      2 => ...
 ))),
   "summary" => 
  ChartMogul\Summary::__set_state(array(
    "current" => 382,
    "previous" => 379,
    "percentage_change" => 0.8,
  ))
));
?>
(*chartmogul.CustomerCountResult)(0xc0420c8ba0)({
 Entries: ([]*chartmogul.CustomerCountMetrics) (len=3) {
  (*chartmogul.CustomerCountMetrics)(0xc04200a480)({
   Date: (string) (len=10) "2016-01-31",
   Customers: (uint32) 1
  }),
  (*chartmogul.CustomerCountMetrics)(0xc04200a4e0)({
   Date: (string) (len=10) "2016-02-29",
   Customers: (uint32) 1
  }),
  (*chartmogul.CustomerCountMetrics)(0xc04200a500)({
   Date: (string) (len=10) "2016-03-12",
   Customers: (uint32) 1
  })
 },
 Summary: (*chartmogul.Summary)(0xc04200a520)({
  Current: (float64) 1,
  Previous: (float64) 1,
  PercentageChange: (float64) 0
 })
})
Metrics(entries=[
    <Metrics{
        customers=1.0, 
        date=datetime.date(2016, 1, 31)}>, 
    <Metrics{
        customers=1.0, 
        date=datetime.date(2016, 2, 29)}>, 
    <Metrics{
        customers=1.0, 
        date=datetime.date(2016, 3, 12)}>], 
summary=<Summary{
    current=1.0, 
    percentage_change=0.0, 
    previous=1.0}>)

In the response, the entries key contains an object for each interval, with the following data:

  • date - The date of the end of the interval
  • customers - The number of active customers in your account as at the end of the interval.

The summary key contains the current Customer Count value, the value 30 days ago, and the percentage change between these two measures.

Language
Authentication
Basic
base64
: