Track Page View
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/page-view \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"page_url": "/sermons",
"page_title": "Sermons",
"session_id": "session-123",
"platform": "web"
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
page_url: '/sermons',
page_title: 'Sermons',
session_id: 'session-123',
platform: 'web'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/page-view', 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/page-view"
payload = {
"page_url": "/sermons",
"page_title": "Sermons",
"session_id": "session-123",
"platform": "web"
}
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": "Page View 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 Page View
Records a page view.
POST
/
v1
/
analytics
/
track
/
page-view
Track Page View
curl --request POST \
--url https://api.thefaithapp.com/v1/analytics/track/page-view \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"page_url": "/sermons",
"page_title": "Sermons",
"session_id": "session-123",
"platform": "web"
}
'const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
page_url: '/sermons',
page_title: 'Sermons',
session_id: 'session-123',
platform: 'web'
})
};
fetch('https://api.thefaithapp.com/v1/analytics/track/page-view', 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/page-view"
payload = {
"page_url": "/sermons",
"page_title": "Sermons",
"session_id": "session-123",
"platform": "web"
}
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": "Page View 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
Viewed URL.
Maximum string length:
500Page title.
Maximum string length:
255Client-generated analytics session identifier.
Maximum string length:
100Client platform.
Available options:
web, ios, android Optional event metadata.
Was this page helpful?