Retrieve analytics data for a given date range.
curl --request GET \
--url https://api-sandbox.appcharge.com/reporting/analytics/stats \
--header 'x-publisher-token: <x-publisher-token>'import requests
url = "https://api-sandbox.appcharge.com/reporting/analytics/stats"
headers = {"x-publisher-token": "<x-publisher-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-publisher-token': '<x-publisher-token>'}};
fetch('https://api-sandbox.appcharge.com/reporting/analytics/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.appcharge.com/reporting/analytics/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-publisher-token: <x-publisher-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/reporting/analytics/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.appcharge.com/reporting/analytics/stats")
.header("x-publisher-token", "<x-publisher-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/reporting/analytics/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
response = http.request(request)
puts response.read_body{
"stats": [
{
"name": "totalRevenue",
"value": 100000.5
},
{
"name": "depositors",
"value": 2000
},
{
"name": "arppu",
"value": 50.25
}
]
}Finance and Analytics
Analytics Reporting API
GET
/
reporting
/
analytics
/
stats
Retrieve analytics data for a given date range.
curl --request GET \
--url https://api-sandbox.appcharge.com/reporting/analytics/stats \
--header 'x-publisher-token: <x-publisher-token>'import requests
url = "https://api-sandbox.appcharge.com/reporting/analytics/stats"
headers = {"x-publisher-token": "<x-publisher-token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-publisher-token': '<x-publisher-token>'}};
fetch('https://api-sandbox.appcharge.com/reporting/analytics/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.appcharge.com/reporting/analytics/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-publisher-token: <x-publisher-token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.appcharge.com/reporting/analytics/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-publisher-token", "<x-publisher-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-sandbox.appcharge.com/reporting/analytics/stats")
.header("x-publisher-token", "<x-publisher-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.appcharge.com/reporting/analytics/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-publisher-token"] = '<x-publisher-token>'
response = http.request(request)
puts response.read_body{
"stats": [
{
"name": "totalRevenue",
"value": 100000.5
},
{
"name": "depositors",
"value": 2000
},
{
"name": "arppu",
"value": 50.25
}
]
}Note: You can read more about the Reporting Analytics API in the Guides section.
| Metric | Description | Type |
|---|---|---|
totalRevenue | Total revenue including tax | Monetary (USD) |
totalRevenueWithoutTax | Total revenue excluding tax | Monetary (USD) |
deposits | Number of User Deposits | Integer |
arppu | Average revenue per paying user | Monetary (USD) |
averageDepositsPerDepositor | Average deposits per depositor | Monetary (USD) |
depositors | Total unique depositors | Integer |
arpu | Average revenue per user | Monetary (USD) |
activeUsers | Total unique active users | Integer |
sessions | Total unique active users | Integer |
dau | Average daily active users | Integer |
Additional Events
Custom metrics can be added upon request. Contact support for integration.Headers
Publisher token for authorization.
Query Parameters
The start date of the reporting period.
The end date of the reporting period.
Response
200 - application/json
Successfully retrieved the analytics data.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
