Get retention data
curl --request GET \
--url https://api.engagefabric.com/api/v1/analytics/retentionimport requests
url = "https://api.engagefabric.com/api/v1/analytics/retention"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.engagefabric.com/api/v1/analytics/retention', 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.engagefabric.com/api/v1/analytics/retention",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.engagefabric.com/api/v1/analytics/retention"
req, _ := http.NewRequest("GET", url, nil)
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.engagefabric.com/api/v1/analytics/retention")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engagefabric.com/api/v1/analytics/retention")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"cohorts": [
{
"cohortId": "<string>",
"cohortLabel": "Week 1 (Jan 6-12)",
"playerCount": 123,
"retention": {
"day1": 123,
"day7": 123,
"day14": 123,
"day30": 123,
"day60": 123,
"day90": 123
},
"engagement": {
"avgXp": 123,
"avgLevel": 123,
"avgQuestsCompleted": 123
}
}
],
"averages": {
"day1": 123,
"day7": 123,
"day14": 123,
"day30": 123
}
}Analytics
Get retention data
Returns retention curves and cohort comparison data for player retention analysis.
GET
/
api
/
v1
/
analytics
/
retention
Get retention data
curl --request GET \
--url https://api.engagefabric.com/api/v1/analytics/retentionimport requests
url = "https://api.engagefabric.com/api/v1/analytics/retention"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.engagefabric.com/api/v1/analytics/retention', 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.engagefabric.com/api/v1/analytics/retention",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.engagefabric.com/api/v1/analytics/retention"
req, _ := http.NewRequest("GET", url, nil)
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.engagefabric.com/api/v1/analytics/retention")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engagefabric.com/api/v1/analytics/retention")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"cohorts": [
{
"cohortId": "<string>",
"cohortLabel": "Week 1 (Jan 6-12)",
"playerCount": 123,
"retention": {
"day1": 123,
"day7": 123,
"day14": 123,
"day30": 123,
"day60": 123,
"day90": 123
},
"engagement": {
"avgXp": 123,
"avgLevel": 123,
"avgQuestsCompleted": 123
}
}
],
"averages": {
"day1": 123,
"day7": 123,
"day14": 123,
"day30": 123
}
}Query Parameters
Project ID to get retention data for
Example:
"550e8400-e29b-41d4-a716-446655440000"
Cohort type for grouping
Available options:
WEEKLY, MONTHLY, CUSTOM ⌘I
