Your masjid · Statistics
Your website figures
What your website did over the last 30 days: pageviews, visitors, visits and their duration, by country, device, source and page.
Right on the key: Statistics: read for a read, edit (secret key) for a write.
Your website figures
GET/v1/masjid/stats/website
Your website's figures over the last 30 days, as the dashboard shows them: pageviews, visitors, visits and their duration, each with its daily values, then visitors by country, device, source and page. Needs Statistics: read.
Parameters
No parameters.
Returns
The figures.
objectwebsite_statsAlways
website_stats.period30dAlways the last 30 days.
pageviewsobjectPages viewed.
Show child attributes (4)
totalnumberOver the period.
seriesobject[]One value per day.
series[].datestringThe day,
YYYY-MM-DD.series[].valuenumberThat day.
visitorsobjectUnique visitors.
Show child attributes (4)
totalnumberOver the period.
seriesobject[]One value per day.
series[].datestringThe day,
YYYY-MM-DD.series[].valuenumberThat day.
sessionsobjectVisits.
Show child attributes (4)
totalnumberOver the period.
seriesobject[]One value per day.
series[].datestringThe day,
YYYY-MM-DD.series[].valuenumberThat day.
durationsobjectVisit duration, in seconds (the total is the average).
Show child attributes (4)
totalnumberOver the period.
seriesobject[]One value per day.
series[].datestringThe day,
YYYY-MM-DD.series[].valuenumberThat day.
countriesobject[]Visitors by country, ISO 3166-1 alpha-2.
Show child attributes (2)
namestringWhat the row counts.
valuenumberIts visitors over the period.
devicesobject[]Visitors by device.
Show child attributes (2)
namestringWhat the row counts.
valuenumberIts visitors over the period.
sourcesobject[]Visitors by source.
Show child attributes (2)
namestringWhat the row counts.
valuenumberIts visitors over the period.
pagesobject[]Visitors by page.
Show child attributes (2)
namestringWhat the row counts.
valuenumberIts visitors over the period.
Errors
curl "https://hub.masjidbox.com/v1/masjid/stats/website" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"countries": [
{
"name": "GB",
"value": 120
}
],
"devices": [
{
"name": "Mobile",
"value": 120
}
],
"durations": {
"series": [
{
"date": "2026-11-01",
"value": 42
}
],
"total": 95
},
"object": "website_stats",
"pages": [
{
"name": "/",
"value": 120
}
],
"pageviews": {
"series": [
{
"date": "2026-11-01",
"value": 42
}
],
"total": 5400
},
"period": "30d",
"sessions": {
"series": [
{
"date": "2026-11-01",
"value": 42
}
],
"total": 1800
},
"sources": [
{
"name": "Google",
"value": 120
}
],
"visitors": {
"series": [
{
"date": "2026-11-01",
"value": 42
}
],
"total": 1200
}
}