Batch Track Analytics
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/batch-track \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"items": [
{
"type": "feature_usage",
"payload": {
"feature": "favorites",
"action": "add",
"session_id": "session-123",
"platform": "ios"
}
}
]
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [
{
type: 'feature_usage',
payload: {
feature: 'favorites',
action: 'add',
session_id: 'session-123',
platform: 'ios'
}
}
]
})
};
fetch('https://api.thefaithapp.com/v1/analytics/batch-track', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/batch-track"
payload = { "items": [
{
"type": "feature_usage",
"payload": {
"feature": "favorites",
"action": "add",
"session_id": "session-123",
"platform": "ios"
}
}
] }
headers = {
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "Success",
"data": {
"succeeded": [
{
"index": 0,
"type": "feature_usage"
}
],
"failed": []
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Analytics
Batch Track Analytics
Records several analytics events in one request. Each item returns an independent success or failure result.
POST
/
v1
/
analytics
/
batch-track
Batch Track Analytics
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/batch-track \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"items": [
{
"type": "feature_usage",
"payload": {
"feature": "favorites",
"action": "add",
"session_id": "session-123",
"platform": "ios"
}
}
]
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [
{
type: 'feature_usage',
payload: {
feature: 'favorites',
action: 'add',
session_id: 'session-123',
platform: 'ios'
}
}
]
})
};
fetch('https://api.thefaithapp.com/v1/analytics/batch-track', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/batch-track"
payload = { "items": [
{
"type": "feature_usage",
"payload": {
"feature": "favorites",
"action": "add",
"session_id": "session-123",
"platform": "ios"
}
}
] }
headers = {
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "Success",
"data": {
"succeeded": [
{
"index": 0,
"type": "feature_usage"
}
],
"failed": []
}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}{
"status": "Error",
"message": "The request could not be completed.",
"error": null,
"error_message": null,
"errors": {}
}Authorizations
Client API key copied from Developer Access in the TheFaithApp dashboard.
Member access token returned by POST /v1/auth/token.
Body
application/json
Analytics events to record.
Show child attributes
Show child attributes
Was this page helpful?
⌘I