Track Feature Usage
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/feature-usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"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({
feature: 'favorites',
action: 'add',
session_id: 'session-123',
platform: 'ios'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/feature-usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/track/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",
"message": "Feature Usage tracked",
"data": {
"id": 1
}
}{
"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
Track Feature Usage
Records an action in a named product feature.
POST
/
v1
/
analytics
/
track
/
feature-usage
Track Feature Usage
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/feature-usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"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({
feature: 'favorites',
action: 'add',
session_id: 'session-123',
platform: 'ios'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/feature-usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thefaithapp.com/v1/analytics/track/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",
"message": "Feature Usage tracked",
"data": {
"id": 1
}
}{
"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
Public client key copied from Developer Access. The member bearer token authenticates the request.
Member access token returned by POST /v1/auth/token.
Body
application/json
Feature name.
Maximum string length:
100Action name.
Maximum string length:
100Client-generated analytics session identifier.
Maximum string length:
100Client platform.
Available options:
web, ios, android Optional event metadata.
Was this page helpful?