{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usenotra-com/json-schema/usenotra-com-geo-web-analytics-breakdowns-response-schema.json",
  "title": "GeoWebAnalyticsBreakdownsResponse",
  "description": "Human web analytics broken down by page, referrer, country, device and more.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usenotra-com-openapi.json#/components/schemas/GeoWebAnalyticsBreakdownsResponse",
  "type": "object",
  "properties": {
    "configured": {
      "type": "boolean",
      "description": "False when the analytics backend is not configured for this deployment; the payload is then empty rather than an error."
    },
    "imported": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "provider": {
          "type": "string",
          "enum": [
            "plausible",
            "plausible_csv",
            "vercel",
            "cloudflare",
            "cloudflare_rum",
            "rybbit",
            "databuddy",
            "posthog"
          ],
          "description": "Analytics provider the history was imported from."
        },
        "until": {
          "type": "string",
          "description": "Last imported day."
        },
        "nativeStart": {
          "type": [
            "string",
            "null"
          ],
          "description": "First day Notra tracked natively, when known."
        }
      },
      "required": [
        "provider",
        "until",
        "nativeStart"
      ],
      "description": "Latest completed history import. Days up to `until` come from it; native tracking starts the day after."
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string",
            "description": "Hostname of the page."
          },
          "path": {
            "type": "string",
            "description": "Page path."
          },
          "views": {
            "type": "integer",
            "description": "Human page views in the window."
          },
          "previousViews": {
            "type": "integer",
            "description": "Views in the previous window of the same length, immediately before this one."
          },
          "visitors": {
            "type": "integer",
            "description": "Unique visitors to this page."
          },
          "landings": {
            "type": "integer",
            "description": "Sessions that started on this page."
          },
          "aiVisitors": {
            "type": "integer",
            "description": "Visitors referred by an AI assistant. Imported history does not contribute."
          }
        },
        "required": [
          "host",
          "path",
          "views",
          "previousViews",
          "visitors",
          "landings",
          "aiVisitors"
        ]
      },
      "description": "Top 50 pages by human views."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "description": "Referrer group of the session's first page: ai, direct, search, social or other. Internal referrals are left out."
          },
          "source": {
            "type": "string",
            "description": "Referrer name, such as a search engine, social network, AI assistant or referring host, or empty for direct traffic."
          },
          "aiProduct": {
            "type": "string",
            "description": "Company behind the AI source, such as openai, anthropic, google or microsoft; the source itself when Notra has no mapping. Empty for non-AI groups."
          },
          "sessions": {
            "type": "integer",
            "description": "Sessions whose first page had this referrer."
          },
          "previousSessions": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Sessions in the previous window of the same length. Null when filtered to a path and the previous window starts before the 90 days of visits Notra keeps."
          },
          "visitors": {
            "type": "integer",
            "description": "Unique visitors from this source."
          }
        },
        "required": [
          "group",
          "source",
          "aiProduct",
          "sessions",
          "previousSessions",
          "visitors"
        ]
      },
      "description": "Top 25 referrer sources by sessions. With a path, only sessions that landed on it."
    },
    "countries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Breakdown value, which is a country code, device class or browser language depending on the list."
          },
          "visitors": {
            "type": "integer",
            "description": "Visitors in the window."
          },
          "previousVisitors": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Visitors in the previous window of the same length, immediately before this one. Returned on every row; 0 when there were none. Null when the row is read from visits Notra keeps for 90 days (languages, or any breakdown filtered to a path) and the previous window starts before them."
          }
        },
        "required": [
          "value",
          "visitors"
        ]
      },
      "description": "Top 8 ISO 3166-1 alpha-2 country codes by visitors."
    },
    "devices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Breakdown value, which is a country code, device class or browser language depending on the list."
          },
          "visitors": {
            "type": "integer",
            "description": "Visitors in the window."
          },
          "previousVisitors": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Visitors in the previous window of the same length, immediately before this one. Returned on every row; 0 when there were none. Null when the row is read from visits Notra keeps for 90 days (languages, or any breakdown filtered to a path) and the previous window starts before them."
          }
        },
        "required": [
          "value",
          "visitors"
        ]
      },
      "description": "Top 8 device classes by visitors."
    },
    "outcomes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "AI source the session landed from. The row with an empty source covers all sessions, AI-referred ones included."
          },
          "sessions": {
            "type": "integer",
            "description": "Sessions in the window."
          },
          "pagesPerSession": {
            "type": "number",
            "description": "Average page views per session."
          },
          "engagedRate": {
            "type": "number",
            "description": "Share of sessions that viewed two or more pages, from 0 to 1."
          }
        },
        "required": [
          "source",
          "sessions",
          "pagesPerSession",
          "engagedRate"
        ]
      },
      "description": "How sessions from each AI source behave compared to all sessions. Native tracking only, without imported history."
    },
    "outboundLinks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Destination host and path, without the query."
          },
          "clicks": {
            "type": "integer",
            "description": "Clicks in the window."
          },
          "previousClicks": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Clicks in the previous window of the same length, immediately before this one. Null when that window starts before the 90 days of clicks Notra keeps."
          },
          "visitors": {
            "type": "integer",
            "description": "Unique visitors who clicked."
          }
        },
        "required": [
          "url",
          "clicks",
          "previousClicks",
          "visitors"
        ]
      },
      "description": "Top 25 clicked links to other sites, reported by notra.js."
    },
    "vitals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "metric": {
            "type": "string",
            "enum": [
              "lcp",
              "inp",
              "cls",
              "fcp",
              "ttfb"
            ],
            "description": "Web Vital the row measures, which is largest contentful paint, interaction to next paint, cumulative layout shift, first contentful paint or time to first byte."
          },
          "p75": {
            "type": "number",
            "description": "75th percentile in milliseconds, or the layout shift score x1000 for cls."
          },
          "samples": {
            "type": "integer",
            "description": "Page views that reported this metric."
          }
        },
        "required": [
          "metric",
          "p75",
          "samples"
        ]
      },
      "description": "Core Web Vitals from real visits across all devices. Each page view counts once with its largest reported value."
    },
    "errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Scrubbed before storage: no query strings, emails or long ids."
          },
          "source": {
            "type": "string",
            "description": "URL of the script that threw, without query or fragment, or empty when unknown."
          },
          "events": {
            "type": "integer",
            "description": "Times this error was reported."
          },
          "views": {
            "type": "integer",
            "description": "Distinct page views that reported this error."
          }
        },
        "required": [
          "message",
          "source",
          "events",
          "views"
        ]
      },
      "description": "Top 25 JavaScript errors reported by notra.plus.js, by count."
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Breakdown value, which is a country code, device class or browser language depending on the list."
          },
          "visitors": {
            "type": "integer",
            "description": "Visitors in the window."
          },
          "previousVisitors": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Visitors in the previous window of the same length, immediately before this one. Returned on every row; 0 when there were none. Null when the row is read from visits Notra keeps for 90 days (languages, or any breakdown filtered to a path) and the previous window starts before them."
          }
        },
        "required": [
          "value",
          "visitors"
        ]
      },
      "description": "Top 8 browser languages by visitors, reported by notra.js."
    },
    "organization": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Workspace ID. Account API keys can send it, or the slug, as X-Notra-Organization-Id."
        },
        "slug": {
          "type": "string",
          "description": "URL-safe workspace handle, unique across Notra."
        },
        "name": {
          "type": "string",
          "description": "Workspace display name."
        },
        "logo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Workspace logo image URL. Null when none is set."
        }
      },
      "required": [
        "id",
        "slug",
        "name",
        "logo"
      ],
      "description": "Workspace the request ran in."
    }
  },
  "required": [
    "configured",
    "pages",
    "sources",
    "countries",
    "devices",
    "outcomes",
    "outboundLinks",
    "vitals",
    "errors",
    "languages",
    "organization"
  ]
}