get https://api.chartmogul.com/v1/metrics/arpa
Retrieves the Average Revenue Per Account (ARPA), for the specified time period.
Examples
curl -X GET "https://api.chartmogul.com/v1/metrics/arpa" \
-u YOUR_API_KEY: \
-d start-date=2015-01-01 \
-d end-date=2015-11-01 \
-d interval=week
ChartMogul::Metrics.arpa(start_date: '2015-01-01', end_date: '2015-11-01', interval: 'week')
ChartMogul.Metrics.arpa(config, {
'start-date': '2015-01-01',
'end-date': '2015-11-01',
'interval': 'week'
}, function (err, res) {
// asynchronously called
});
<?php
ChartMogul\Metrics::arpa([
"start-date" => "2015-01-01",
"end-date" => "2015-11-01",
"interval" => "month"
]);
?>
api.MetricsRetrieveARPA(&cm.MetricsFilter{
StartDate: "2016-01-01",
EndDate: "2016-03-12",
Interval: "month",
Geo: "GB",
Plans: "PRO Plan",
})
chartmogul.Metrics.arpa(
config,
start_date="2016-01-01",
end_date="2016-03-12",
interval="month",
geo="GB",
plans="PRO Plan")
Result Format
{
"entries":[
{
"date":"2015-01-03",
"arpa":15000,
"percentage-change":0.0
},
{
"date":"2015-01-10",
"arpa":15000,
"percentage-change":0.0
},
{"...more...": "...entries..."}
],
"summary":{
"current":980568,
"previous":980568,
"percentage-change":0.0
}
}
#<ChartMogul::Metrics::ARPAs:0x007fa4ec591148
@entries=[
#<ChartMogul::Metrics::ARPA:0x007fa4ec590ef0
@date=2015-01-03,
@arpa=15000,
@percentage_change=0.0
>,
#<ChartMogul::Metrics::ARPA:0x007fa4ec590ab8
@date=2015-01-10,
@arpa=15000,
@percentage_change=0.0
>,
<...more entries...>
],
@summary=#<ChartMogul::Summary:0x007fa4ec578ff8
@current=980568,
@previous=980568,
@percentage_change=0.0
>
>
{
"entries":[
{
"date":"2015-01-03",
"arpa":15000,
"percentage-change":0.0
},
{
"date":"2015-01-10",
"arpa":15000,
"percentage-change":0.0
},
{"...more...": "...entries..."}
],
"summary":{
"current":980568,
"previous":980568,
"percentage-change":0.0
}
}
<?php
ChartMogul\Metrics\ARPAs::__set_state(array(
"entries" =>
Doctrine\Common\Collections\ArrayCollection::__set_state(array(
"elements" =>
array (
0 =>
ChartMogul\Metrics\ARPA::__set_state(array(
"date" => "2015-01-31",
"arpa" => 15000,
"percentage_change" => 0.0
)),
1 => ...
))),
"summary" =>
ChartMogul\Summary::__set_state(array(
"current" => 980568,
"previous" => 980568,
"percentage_change" => 9.0
)),
));
?>
(*chartmogul.ARPAResult)(0xc0420b2f00)({
Entries: ([]*chartmogul.ARPAMetrics) (len=3) {
(*chartmogul.ARPAMetrics)(0xc0421d60a0)({
Date: (string) (len=10) "2016-01-31",
ARPA: (float64) 4100,
PercentageChange: (float64) 0
}),
(*chartmogul.ARPAMetrics)(0xc0421d6100)({
Date: (string) (len=10) "2016-02-29",
ARPA: (float64) 4100,
PercentageChange: (float64) 0
}),
(*chartmogul.ARPAMetrics)(0xc0421d6120)({
Date: (string) (len=10) "2016-03-12",
ARPA: (float64) 4100,
PercentageChange: (float64) 0
})
},
Summary: (*chartmogul.Summary)(0xc0421d6140)({
Current: (float64) 4100,
Previous: (float64) 4100,
PercentageChange: (float64) 0
})
})
Metrics(entries=[
<Metrics{
arpa=4100.0,
percentage_change=0.0,
date=datetime.date(2016, 1, 31)}>,
<Metrics{
arpa=4100.0,
percentage_change=0.0,
date=datetime.date(2016, 2, 29)}>,
<Metrics{
arpa=4100.0,
percentage_change=0.0,
date=datetime.date(2016, 3, 12)}>],
summary=<Summary{
current=4100.0,
percentage_change=0.0,
previous=4100.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 intervalarpa
- The ARPA as at the end of the period. This is in your account's selected currency, and is an integer number of cents. Divide it by 100 to obtain the actual value.percentage-change
- The percentage change between the current ARPA and ARPA from the previous time interval. Will be set to0.0
if this is the first entry in the response.
The summary
key contains the current ARPA value, the value 30 days ago, and the percentage change between these two measures.