Skip to content

API reference

Get site analytics summary

analytics.GetSiteAnalyticsSummaryReadAPI key

Read a hosted website's traffic totals and trends for the selected dates.

POST/v1/operations/analytics.GetSiteAnalyticsSummary
On this page

Access & visibility

Allow analytics.GetSiteAnalyticsSummary on your API key.

Workspace access by default. Private member data requires approved member delegation through Brigg-Act-As; the key supplies permissions while private ownership and project boundaries remain enforced.

Set up authentication · Choose permissions

Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.

bundle_idstringRequired

Select a website and use its content_id. This is the website identity, not a domain hostname or workspace ID. workspace.ListBundles.

At least 1 character.

fromintegerOptional

First UTC day, inclusive: floor(unixMilliseconds / 86400000). Defaults to 29 days before to. It is not a timestamp or date string.

tointegerOptional

Last UTC day, inclusive, as days since 1970-01-01. Defaults to today. If from is after to it becomes to; a difference above 366 is reduced to 366. Read the effective bounds in the response.

Choose and interpret a reporting interval

from and to are inclusive UTC day indexes, not dates or Unix milliseconds. For example, 1 October 2026 is 20727. In JavaScript use Math.floor(Date.parse("2026-10-01T00:00:00Z") / 86400000). Omitted to means today; omitted from means 29 days before to. The service clamps a span longer than 366 days. Read the response's from and to to see the interval actually used.

bounce_rate is a fraction, so 0.2 means 20%. Fields ending in Ms are durations in milliseconds. Summary visitors is the sum of daily visitor counts, not a deduplicated count of people across the interval. The same visitor can count on several days; workspace totals also sum across sites.

Response

Returns 200 OK with a JSON body.

bundle_idstringRequired

Bundle identifier.

fromnumberRequired

First UTC day in the reporting interval, inclusive. A day index counts days since 1970-01-01; multiply by 86400000 to obtain Unix milliseconds.

tonumberRequired

Last UTC day in the reporting interval, inclusive, as a day index since 1970-01-01.

seriesarray of objectRequired

Available daily buckets in ascending UTC-day order. Dates without activity are omitted; insert zeros in your chart when a continuous date axis is needed.

Item fields
daynumberRequired

UTC day for this reporting bucket, as days since 1970-01-01, not Unix milliseconds.

pageviewsnumberRequired

Pageviews whose event time falls on this UTC day.

visitorsnumberRequired

Distinct visitors within this UTC day and site; workspace series sums the per-site counts.

sessionsnumberRequired

Sessions beginning on this UTC day.

pageviewsnumberRequired

Total pageview events in the effective interval.

visitorsnumberRequired

Sum of daily distinct visitors per site. A person returning on another day or site can be counted again; this is not a deduplicated multi-day audience.

sessionsnumberRequired

Visits, separated by an inactivity gap of at least 30 minutes. A visit crossing midnight is attributed to its starting day.

bouncesnumberRequired

Sessions containing a single pageview.

bounce_ratenumberRequired

bounces divided by sessions, from 0 to 1; 0 when sessions is zero. Multiply by 100 for a percentage.

avg_visit_msnumberRequired

Total session duration divided by sessions, rounded to milliseconds; 0 when there are no sessions.

avg_engagement_msnumberRequired

Total active-page time divided by pageviews, rounded to milliseconds; 0 when there are no pageviews. This is per pageview, not per session.

Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See HTTP errors and safe retries and limits.

HTTP status Code What to do
400 invalid_json Send a JSON object with Content-Type: application/json.
400 invalid_input Check the request fields and types.
401 invalid_key The workspace API key is missing, invalid or revoked.
403 forbidden Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member.
404 not_found The requested operation or resource is not available to this credential.
429 rate_limited Wait for Retry-After before retrying.

Next steps

Download OpenAPI · Versioning & retirement

JSON schemas

Use the complete schemas for validation or client generation.

Full request JSON schema
{
  "type": "object",
  "properties": {
    "bundle_id": {
      "type": "string",
      "minLength": 1,
      "description": "Select a website and use its content_id. This is the website identity, not a domain hostname or workspace ID. [workspace.ListBundles](/developers/reference/workspace/ListBundles)."
    },
    "from": {
      "type": "integer",
      "description": "First UTC day, inclusive: floor(unixMilliseconds / 86400000). Defaults to 29 days before to. It is not a timestamp or date string."
    },
    "to": {
      "type": "integer",
      "description": "Last UTC day, inclusive, as days since 1970-01-01. Defaults to today. If from is after to it becomes to; a difference above 366 is reduced to 366. Read the effective bounds in the response."
    }
  },
  "required": [
    "bundle_id"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "bundle_id": "c_company_site",
      "from": 20727,
      "to": 20728
    }
  ]
}
Full response JSON schema
{
  "type": "object",
  "properties": {
    "bundle_id": {
      "type": "string",
      "description": "Bundle identifier."
    },
    "from": {
      "type": "number",
      "description": "First UTC day in the reporting interval, inclusive. A day index counts days since 1970-01-01; multiply by 86400000 to obtain Unix milliseconds."
    },
    "to": {
      "type": "number",
      "description": "Last UTC day in the reporting interval, inclusive, as a day index since 1970-01-01."
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "day": {
            "type": "number",
            "description": "UTC day for this reporting bucket, as days since 1970-01-01, not Unix milliseconds."
          },
          "pageviews": {
            "type": "number",
            "description": "Pageviews whose event time falls on this UTC day."
          },
          "visitors": {
            "type": "number",
            "description": "Distinct visitors within this UTC day and site; workspace series sums the per-site counts."
          },
          "sessions": {
            "type": "number",
            "description": "Sessions beginning on this UTC day."
          }
        },
        "required": [
          "day",
          "pageviews",
          "visitors",
          "sessions"
        ],
        "additionalProperties": false
      },
      "description": "Available daily buckets in ascending UTC-day order. Dates without activity are omitted; insert zeros in your chart when a continuous date axis is needed."
    },
    "pageviews": {
      "type": "number",
      "description": "Total pageview events in the effective interval."
    },
    "visitors": {
      "type": "number",
      "description": "Sum of daily distinct visitors per site. A person returning on another day or site can be counted again; this is not a deduplicated multi-day audience."
    },
    "sessions": {
      "type": "number",
      "description": "Visits, separated by an inactivity gap of at least 30 minutes. A visit crossing midnight is attributed to its starting day."
    },
    "bounces": {
      "type": "number",
      "description": "Sessions containing a single pageview."
    },
    "bounce_rate": {
      "type": "number",
      "description": "bounces divided by sessions, from 0 to 1; 0 when sessions is zero. Multiply by 100 for a percentage."
    },
    "avg_visit_ms": {
      "type": "number",
      "description": "Total session duration divided by sessions, rounded to milliseconds; 0 when there are no sessions."
    },
    "avg_engagement_ms": {
      "type": "number",
      "description": "Total active-page time divided by pageviews, rounded to milliseconds; 0 when there are no pageviews. This is per pageview, not per session."
    }
  },
  "required": [
    "bundle_id",
    "from",
    "to",
    "series",
    "pageviews",
    "visitors",
    "sessions",
    "bounces",
    "bounce_rate",
    "avg_visit_ms",
    "avg_engagement_ms"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "from": 20727,
      "to": 20728,
      "series": [
        {
          "day": 20727,
          "pageviews": 80,
          "visitors": 40,
          "sessions": 50
        },
        {
          "day": 20728,
          "pageviews": 40,
          "visitors": 20,
          "sessions": 25
        }
      ],
      "pageviews": 120,
      "visitors": 60,
      "sessions": 75,
      "bounces": 15,
      "bounce_rate": 0.2,
      "avg_visit_ms": 120000,
      "avg_engagement_ms": 60000,
      "bundle_id": "c_company_site"
    }
  ]
}

Search by operation name or what you want to build.

Use arrow keys to browse. Enter opens a result.