Retrieve LTV

Retrieves the Customer Lifetime Value (LTV), for the specified time period.

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

ChartMogul\Metrics::ltv([
    "start-date" => "2015-01-01",
    "end-date" => "2015-11-01",
]);
?>
api.MetricsRetrieveLTV(&cm.MetricsFilter{
        StartDate: "2016-01-01",
        EndDate:   "2016-03-12",
        Interval:  "month",
    Geo:             "GB",
    Plans:       "PRO Plan",
    })
chartmogul.Metrics.ltv(
    config,
    start_date="2016-01-01",
    end_date="2016-03-12",
    interval="month",
      geo="GB",
        plans="PRO Plan")
Result Format
{
  "entries":[
    {
      "date":"2015-01-31",
      "ltv":0,
      "percentage-change":0.0
    },
    {
      "date":"2015-02-28",
      "ltv":0,
      "percentage-change":0.0
    },
    {
      "date":"2015-03-31",
      "ltv":1862989,
      "percentage-change":0.0
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":980568,
    "previous":980568,
    "percentage-change":0.0
  }
}
#<ChartMogul::Metrics::LTVs:0x007faf03c4b440 
@entries=[
  #<ChartMogul::Metrics::LTV:0x007faf03c4b0a8 
  @date=2015-01-31, 
  @ltv=0,
  @percentage_change=0
  >, 
  #<ChartMogul::Metrics::LTV:0x007faf03c4aab8 
  @date=2015-02-28, 
  @ltv=0,
  @percentage_change=0
  >, 
  #<ChartMogul::Metrics::LTV:0x007faf03c4a720 
  @date=2015-03-31, 
  @ltv=1862989,
  @percentage_change=0
  >, 
  <...more entries...>
], 
@summary=
  #<ChartMogul::Summary:0x007faf03c484c0
  @current=980568,
  @previous=980568,
  @percentage_change=0
>
>
{
  "entries":[
    {
      "date":"2015-01-31",
      "ltv":0,
      "percentage-change":0.0
    },
    {
      "date":"2015-02-28",
      "ltv":0,
      "percentage-change":0.0
    },
    {
      "date":"2015-03-31",
      "ltv":1862989,
      "percentage-change":0.0
    },
    {"...more...": "...entries..."}
  ],
  "summary":{
    "current":980568,
    "previous":980568,
    "percentage-change":0.0
  }
}
<?php

ChartMogul\Metrics\LTVs::__set_state(array(
    "entries" =>
   Doctrine\Common\Collections\ArrayCollection::__set_state(array(
      "elements" =>
     array (
       0 =>
       ChartMogul\Metrics\LTV::__set_state(array(
          "date" => "2015-01-31",
          "ltv" => 0.0,
          "percentage_change" => 0.0
       )),
       1 =>
       ChartMogul\Metrics\LTV::__set_state(array(
          "date" => "2015-02-28",
          "ltv" => 0.0,
          "percentage_change" => 0.0
       )),
       2 => 
       ChartMogul\Metrics\LTV::__set_state(array(
          "date" => "2015-03-31",
          "ltv" => 1862989,
          "percentage_change" => 0.0
       )),
       3 => ...
   ))),
    "summary" =>
   ChartMogul\Summary::__set_state(array(
      "current" => 980568,
      "previous" => 980568,
      "percentage_change" => 0.0
   )),
));
?>
(*chartmogul.LTVResult)(0xc0420b2f00)({
 Entries: ([]*chartmogul.LTVMetrics) (len=3) {
  (*chartmogul.LTVMetrics)(0xc0421aa0e0)({
   Date: (string) (len=10) "2016-01-31",
   LTV: (float64) 0,
   PercentageChange: (float64) 0
  }),
  (*chartmogul.LTVMetrics)(0xc0421aa140)({
   Date: (string) (len=10) "2016-02-29",
   LTV: (float64) 0,
   PercentageChange: (float64) 0
  }),
  (*chartmogul.LTVMetrics)(0xc0421aa160)({
   Date: (string) (len=10) "2016-03-12",
   LTV: (float64) 0,
   PercentageChange: (float64) 0
  })
 },
 Summary: (*chartmogul.Summary)(0xc0421aa180)({
  Current: (float64) 0,
  Previous: (float64) 0,
  PercentageChange: (float64) 0
 })
})
Metrics(entries=[
    <Metrics{
        date=datetime.date(2016, 1, 31),
        ltv=0.0,
        percentage_change=0.0}>,
    <Metrics{
        date=datetime.date(2016, 2, 29),
        ltv=0.0,
        percentage_change=0.0}>,
    <Metrics{
        date=datetime.date(2016, 3, 12),
        ltv=0.0,
        percentage_change=0.0,}>], 
summary=<Summary{
    current=0.0,
    percentage_change=0.0,
    previous=0.0}>)

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

  • date - The date of the end of the month
  • ltv - The Customer LTV as at the end of the month. This is in your account's selected currency, and is a number of cents. Divide it by 100 to obtain the actual value.
  • percentage-change - The percentage change between the current LTV and LTV from the previous time interval. Will be set to 0.0 if this is the first entry in the response.

The summary key contains the last month's LTV, the LTV a month before that, and the percentage change between these two measures.

Language
Authentication
Basic
base64
: