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

Masjid key · Statistics: read

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_stats

    Always website_stats.

  • period30d

    Always the last 30 days.

  • pageviewsobject

    Pages viewed.

    Show child attributes (4)
    • totalnumber

      Over the period.

    • seriesobject[]

      One value per day.

    • series[].datestring

      The day, YYYY-MM-DD.

    • series[].valuenumber

      That day.

  • visitorsobject

    Unique visitors.

    Show child attributes (4)
    • totalnumber

      Over the period.

    • seriesobject[]

      One value per day.

    • series[].datestring

      The day, YYYY-MM-DD.

    • series[].valuenumber

      That day.

  • sessionsobject

    Visits.

    Show child attributes (4)
    • totalnumber

      Over the period.

    • seriesobject[]

      One value per day.

    • series[].datestring

      The day, YYYY-MM-DD.

    • series[].valuenumber

      That day.

  • durationsobject

    Visit duration, in seconds (the total is the average).

    Show child attributes (4)
    • totalnumber

      Over the period.

    • seriesobject[]

      One value per day.

    • series[].datestring

      The day, YYYY-MM-DD.

    • series[].valuenumber

      That day.

  • countriesobject[]

    Visitors by country, ISO 3166-1 alpha-2.

    Show child attributes (2)
    • namestring

      What the row counts.

    • valuenumber

      Its visitors over the period.

  • devicesobject[]

    Visitors by device.

    Show child attributes (2)
    • namestring

      What the row counts.

    • valuenumber

      Its visitors over the period.

  • sourcesobject[]

    Visitors by source.

    Show child attributes (2)
    • namestring

      What the row counts.

    • valuenumber

      Its visitors over the period.

  • pagesobject[]

    Visitors by page.

    Show child attributes (2)
    • namestring

      What the row counts.

    • valuenumber

      Its visitors over the period.

GET /v1/masjid/stats/website
curl "https://hub.masjidbox.com/v1/masjid/stats/website" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidWebsiteStats
{
  "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
  }
}