> For the complete documentation index, see [llms.txt](https://docs.intelligems.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.intelligems.io/developer-resources/external-api/fetch-sitewide-analytics.md).

# Fetch Sitewide Analytics

## POST /v25-10-beta/analytics/sitewide/conversion-funnel

> \## Get Sitewide Conversion Funnel\
> \
> Retrieve the sitewide conversion funnel as a Sankey graph: visitors flow from entry point → landing page → second page → cart → checkout → conversion. The step-1 entry-point nodes default to device type (Mobile / Desktop); set \`audience\` to pivot step 1 on traffic source, visitor type, or source site instead. Top-5 bucketing per step plus catch-all \`Other\` / \`Bounced\` rollups happen server-side; the wire format is already aggregated.\
> \
> \`POST /v25-10-beta/analytics/sitewide/conversion-funnel\`\
> \
> \### Request\
> \
> \| Field              | Required | Type                     | Notes                                                                                                                                                                                                                                                                                                               |\
> \| ------------------ | -------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\
> \| \`start\`            | no       | ISO 8601 datetime string | Beginning of the analysis window. Defaults to 30 days ago.                                                                                                                                                                                                                                                          |\
> \| \`end\`              | no       | ISO 8601 datetime string | End of the analysis window. Defaults to now.                                                                                                                                                                                                                                                                        |\
> \| \`filters\`          | no       | filters object           | Shared sitewide filters that narrow the underlying dataset — \`deviceType\`, \`visitorType\`, \`sourceSitesOrChannels\`, \`countryCodes\`, \`currencyCodes\`, \`onlyProductIds\`, \`landingPageFilters\` (preferred; \`landingPage\` is deprecated), \`landingPageTypes\`, etc. See the Filters Reference for the full list.          |\
> \| \`audience\`         | no       | string enum              | Pivots the funnel's step-1 entry-point dimension — it controls which buckets are \_rendered\_ at step 1, not which sessions are \_included\_. One of \`"device\_type"\`, \`"visitor\_type"\`, \`"source\_channel"\`, \`"source\_site"\`. Unrecognized values silently default to \`"device\_type"\`. See "Audience vs. filters" below. |\
> \| \`conversionFunnel\` | no       | conversionFunnel object  | Funnel-specific filters. Stage flags + single landing/second page-type pins. See "Funnel-specific filters" below.                                                                                                                                                                                                   |\
> \
> \### The \`conversionFunnel\` object\
> \
> All funnel-specific filtering lives in a single optional \`conversionFunnel\` object. All fields are optional; combine any subset.\
> \
> \*\*Stage flags\*\* (boolean) — narrow the funnel input to sessions that hit a behavioral stage:\
> \
> \- \`addedToCart\` — sessions that added at least one item to cart\
> \- \`startedCheckout\` — sessions that started checkout\
> \- \`converted\` — sessions that converted\
> \- \`bounced\` — sessions that bounced (no second page)\
> \- \`abandonedCart\` — added to cart but did not convert\
> \- \`abandonedCheckout\` — started checkout but did not convert\
> \- \`exitedBeforeAtc\` — exited before adding to cart\
> \- \`viewedCollectionPage\` — viewed a collection page\
> \- \`viewedProductPage\` — viewed a product detail page\
> \
> \*\*Page-type pins\*\* (landing-page enum) — pin the funnel to a single journey:\
> \
> \- \`landingPageType\` — restrict to sessions whose landing page was this type\
> \- \`secondPageType\` — restrict to sessions whose second page was this type\
> \
> Supported page-type values: \`"PDP"\`, \`"Collection"\`, \`"Content"\`, \`"Blog"\`, \`"Homepage"\`, \`"Search"\`, \`"Cart"\`, \`"Other"\`.\
> \
> \### Funnel-specific vs. shared filters\
> \
> Two distinct layers of filtering, and they behave differently:\
> \
> \- \*\*\`filters.landingPageTypes\`\*\* (plural, array, inside the shared \`filters\` object) — narrows the \_underlying dataset\_ to sessions starting on any of the selected page types. Same as the other \`/sitewide/\*\` endpoints.\
> \- \*\*\`conversionFunnel.landingPageType\`\*\* / \*\*\`conversionFunnel.secondPageType\`\*\* (singular) — \_pin the funnel itself\_ to a specific journey, so a caller can see how the PDP → 2nd-page-PDP path converted in isolation.\
> \- \*\*\`conversionFunnel\` stage flags\*\* (\`addedToCart\`, \`converted\`, etc.) — narrow the \_input population\_ to sessions that hit a specific behavioral stage. Equivalent to the clickable node filters in the Intelligems dashboard.\
> \
> \`conversionFunnel\` reuses the same schema the Intelligems dashboard sends internally, so the external contract matches the dashboard's funnel filtering exactly.\
> \
> \### Audience vs. filters\
> \
> \`audience\` and the shared \`filters\` look related but do \*\*completely different\*\* things. The simplest way to keep them straight:\
> \
> \> \*\*\`filters\` change \_which sessions are included\_ in the funnel. \`audience\` changes \_which buckets are shown\_ at step 1. They don't filter the same way — in fact, \`audience\` doesn't filter at all.\*\*\
> \
> Concrete contrast:\
> \
> \- \*\*\`filters.deviceType: "mobile"\`\*\* → the funnel is computed over \*\*only mobile sessions\*\*. Every step in the response reflects mobile-only counts. Desktop sessions are gone from the dataset entirely.\
> \- \*\*\`audience: "device\_type"\`\*\* → the \*\*full dataset\*\* (mobile + desktop) is funneled, but step 1 of the Sankey is \*\*split into \`"Mobile"\` and \`"Desktop"\` nodes\*\* so you can see how each device cohort flows down. Nothing is filtered out.\
> \
> Two questions, two different answers:\
> \
> \| Question                                                                                | Use                                               |\
> \| --------------------------------------------------------------------------------------- | ------------------------------------------------- |\
> \| "How does the funnel look \*\*for mobile traffic specifically\*\*?"                         | \`filters: { deviceType: "mobile" }\`               |\
> \| "How does the funnel \*\*split\*\* between Mobile and Desktop visitors at the entry point?" | \`audience: "device\_type"\`                         |\
> \| "How does the funnel split by channel, restricted to mobile US traffic?"                | both: \`audience: "source\_channel"\` + \`filters: …\` |\
> \
> They compose without conflict — \`audience\` controls the rendering of step 1, \`filters\` controls what data feeds into the funnel in the first place.\
> \
> \#### Supported \`audience\` values\
> \
> \| \`audience\` value   | Step-1 nodes                                                                                               |\
> \| ------------------ | ---------------------------------------------------------------------------------------------------------- |\
> \| \`"device\_type"\`    | \`"Mobile"\`, \`"Desktop"\`                                                                                    |\
> \| \`"visitor\_type"\`   | \`"New"\`, \`"Returning"\`                                                                                     |\
> \| \`"source\_channel"\` | Channel buckets: \`"Paid Social"\`, \`"Paid Search"\`, \`"Direct"\`, \`"Organic Social"\`, \`"Email"\`, \`"Other"\`, … |\
> \| \`"source\_site"\`    | Referrer host buckets (\`"google.com"\`, \`"facebook.com"\`, …) with top-5 + \`"Other"\` rollup                  |\
> \
> These four mirror the Customer Journey chart's audience selector exactly. The shared \`AnalyticsAudienceType\` enum also has \`country\_code\` and \`landing\_page\_full\_path\` values, but the funnel intentionally excludes those — they're not surfaced in the dashboard's funnel view, so the external API and MCP do not expose them either.\
> \
> \#### Fallback on unrecognized values\
> \
> If \`audience\` is set to any string outside the four supported values (e.g., \`"country\_code"\`, \`"channel"\`, \`"new\_vs\_returning"\`, a typo), the request \*\*does not 400\*\* — the value silently falls back to \`"device\_type"\` and a warning is logged server-side. This is deliberate so that LLM-driven callers that guess slightly-wrong dimension names still get a sensible funnel back instead of an opaque validation error.\
> \
> When \`audience\` is omitted entirely, the funnel uses its built-in default step-1 split (the same default the dashboard's Customer Journey chart starts on).\
> \
> \### Response\
> \
> Abbreviated example (one path through all six steps). Note every node referenced by a \`link\` appears in \`nodes\`, and step numbers are contiguous — a real response has more nodes/links per step:\
> \
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "nodes": \[\
> &#x20;     { "name": "Mobile", "step": 1, "value": 8000, "pct": 0.8 },\
> &#x20;     { "name": "Desktop", "step": 1, "value": 2000, "pct": 0.2 },\
> &#x20;     { "name": "Landing: PDP", "step": 2, "value": 6500, "pct": 0.65 },\
> &#x20;     { "name": "Bounced", "step": 3, "value": 4200, "pct": 0.42 },\
> &#x20;     { "name": "2nd Page: PDP", "step": 3, "value": 2300, "pct": 0.23 },\
> &#x20;     {\
> &#x20;       "name": "Exited before Add to Cart",\
> &#x20;       "step": 4,\
> &#x20;       "value": 1500,\
> &#x20;       "pct": 0.15\
> &#x20;     },\
> &#x20;     { "name": "Added to Cart", "step": 4, "value": 800, "pct": 0.08 },\
> &#x20;     { "name": "Started Checkout", "step": 5, "value": 480, "pct": 0.048 },\
> &#x20;     { "name": "Abandoned Cart", "step": 5, "value": 320, "pct": 0.032 },\
> &#x20;     { "name": "Converted", "step": 6, "value": 300, "pct": 0.03 },\
> &#x20;     { "name": "Abandoned Checkout", "step": 6, "value": 180, "pct": 0.018 }\
> &#x20;   ],\
> &#x20;   "links": \[\
> &#x20;     {\
> &#x20;       "source": "Mobile",\
> &#x20;       "target": "Landing: PDP",\
> &#x20;       "step": 1,\
> &#x20;       "value": 5200\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Desktop",\
> &#x20;       "target": "Landing: PDP",\
> &#x20;       "step": 1,\
> &#x20;       "value": 1300\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Landing: PDP",\
> &#x20;       "target": "Bounced",\
> &#x20;       "step": 2,\
> &#x20;       "value": 4200\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Landing: PDP",\
> &#x20;       "target": "2nd Page: PDP",\
> &#x20;       "step": 2,\
> &#x20;       "value": 2300\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "2nd Page: PDP",\
> &#x20;       "target": "Exited before Add to Cart",\
> &#x20;       "step": 3,\
> &#x20;       "value": 1500\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "2nd Page: PDP",\
> &#x20;       "target": "Added to Cart",\
> &#x20;       "step": 3,\
> &#x20;       "value": 800\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Added to Cart",\
> &#x20;       "target": "Started Checkout",\
> &#x20;       "step": 4,\
> &#x20;       "value": 480\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Added to Cart",\
> &#x20;       "target": "Abandoned Cart",\
> &#x20;       "step": 4,\
> &#x20;       "value": 320\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Started Checkout",\
> &#x20;       "target": "Converted",\
> &#x20;       "step": 5,\
> &#x20;       "value": 300\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "source": "Started Checkout",\
> &#x20;       "target": "Abandoned Checkout",\
> &#x20;       "step": 5,\
> &#x20;       "value": 180\
> &#x20;     }\
> &#x20;   ]\
> &#x20; }\
> }\
> \`\`\`\
> \
> Every node a link references is present in \`nodes\`, steps run 1→6 with no gaps, and each \`link.step\` equals its source node's step. \`pct\` values are all fractions of the step-1 total (10,000 here).\
> \
> \- \*\*\`nodes\`\*\* — one entry per labeled state at each step. Ordered by \`(step ascending, value descending)\`.\
> &#x20; \- \`name\` — node label (e.g. \`"Mobile"\`, \`"Landing: PDP"\`, \`"Bounced"\`, \`"Added to Cart"\`).\
> &#x20; \- \`step\` — 1-indexed step position in the funnel.\
> &#x20; \- \`value\` — visitor count at this node.\
> &#x20; \- \`pct\` — share of step-1 visitors that reached this node, as a fraction in \`\[0, 1]\` (not a percent).\
> \- \*\*\`links\`\*\* — one entry per transition between adjacent step nodes. Ordered by \`(step ascending, value descending)\`.\
> &#x20; \- \`source\` / \`target\` — node names on either end of the transition.\
> &#x20; \- \`step\` — step of the source node.\
> &#x20; \- \`value\` — visitor count traversing this link.\
> \
> \#### Server-side bucketing\
> \
> At each step the server keeps the top 5 entries by traffic and rolls everything else into \`"Other"\`. Two special node names are reserved:\
> \
> \- \`"Bounced"\` — sessions that ended before reaching a second page.\
> \- \`"Landing: Other"\` / \`"2nd Page: Other"\` — catch-all buckets for low-volume landing or second-page types.\
> \
> This is the same shape the Intelligems dashboard renders; there is no "unbucketed" mode.\
> \
> \### Rate limits\
> \
> Same rate limit as the other \`/analytics/sitewide/\*\` endpoints. Aggregated, cacheable data — see the Rate Limiting Reference.

````json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Production"}],"paths":{"/v25-10-beta/analytics/sitewide/conversion-funnel":{"post":{"tags":["Fetch Sitewide Analytics"],"description":"## Get Sitewide Conversion Funnel\n\nRetrieve the sitewide conversion funnel as a Sankey graph: visitors flow from entry point → landing page → second page → cart → checkout → conversion. The step-1 entry-point nodes default to device type (Mobile / Desktop); set `audience` to pivot step 1 on traffic source, visitor type, or source site instead. Top-5 bucketing per step plus catch-all `Other` / `Bounced` rollups happen server-side; the wire format is already aggregated.\n\n`POST /v25-10-beta/analytics/sitewide/conversion-funnel`\n\n### Request\n\n| Field              | Required | Type                     | Notes                                                                                                                                                                                                                                                                                                               |\n| ------------------ | -------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `start`            | no       | ISO 8601 datetime string | Beginning of the analysis window. Defaults to 30 days ago.                                                                                                                                                                                                                                                          |\n| `end`              | no       | ISO 8601 datetime string | End of the analysis window. Defaults to now.                                                                                                                                                                                                                                                                        |\n| `filters`          | no       | filters object           | Shared sitewide filters that narrow the underlying dataset — `deviceType`, `visitorType`, `sourceSitesOrChannels`, `countryCodes`, `currencyCodes`, `onlyProductIds`, `landingPageFilters` (preferred; `landingPage` is deprecated), `landingPageTypes`, etc. See the Filters Reference for the full list.          |\n| `audience`         | no       | string enum              | Pivots the funnel's step-1 entry-point dimension — it controls which buckets are _rendered_ at step 1, not which sessions are _included_. One of `\"device_type\"`, `\"visitor_type\"`, `\"source_channel\"`, `\"source_site\"`. Unrecognized values silently default to `\"device_type\"`. See \"Audience vs. filters\" below. |\n| `conversionFunnel` | no       | conversionFunnel object  | Funnel-specific filters. Stage flags + single landing/second page-type pins. See \"Funnel-specific filters\" below.                                                                                                                                                                                                   |\n\n### The `conversionFunnel` object\n\nAll funnel-specific filtering lives in a single optional `conversionFunnel` object. All fields are optional; combine any subset.\n\n**Stage flags** (boolean) — narrow the funnel input to sessions that hit a behavioral stage:\n\n- `addedToCart` — sessions that added at least one item to cart\n- `startedCheckout` — sessions that started checkout\n- `converted` — sessions that converted\n- `bounced` — sessions that bounced (no second page)\n- `abandonedCart` — added to cart but did not convert\n- `abandonedCheckout` — started checkout but did not convert\n- `exitedBeforeAtc` — exited before adding to cart\n- `viewedCollectionPage` — viewed a collection page\n- `viewedProductPage` — viewed a product detail page\n\n**Page-type pins** (landing-page enum) — pin the funnel to a single journey:\n\n- `landingPageType` — restrict to sessions whose landing page was this type\n- `secondPageType` — restrict to sessions whose second page was this type\n\nSupported page-type values: `\"PDP\"`, `\"Collection\"`, `\"Content\"`, `\"Blog\"`, `\"Homepage\"`, `\"Search\"`, `\"Cart\"`, `\"Other\"`.\n\n### Funnel-specific vs. shared filters\n\nTwo distinct layers of filtering, and they behave differently:\n\n- **`filters.landingPageTypes`** (plural, array, inside the shared `filters` object) — narrows the _underlying dataset_ to sessions starting on any of the selected page types. Same as the other `/sitewide/*` endpoints.\n- **`conversionFunnel.landingPageType`** / **`conversionFunnel.secondPageType`** (singular) — _pin the funnel itself_ to a specific journey, so a caller can see how the PDP → 2nd-page-PDP path converted in isolation.\n- **`conversionFunnel` stage flags** (`addedToCart`, `converted`, etc.) — narrow the _input population_ to sessions that hit a specific behavioral stage. Equivalent to the clickable node filters in the Intelligems dashboard.\n\n`conversionFunnel` reuses the same schema the Intelligems dashboard sends internally, so the external contract matches the dashboard's funnel filtering exactly.\n\n### Audience vs. filters\n\n`audience` and the shared `filters` look related but do **completely different** things. The simplest way to keep them straight:\n\n> **`filters` change _which sessions are included_ in the funnel. `audience` changes _which buckets are shown_ at step 1. They don't filter the same way — in fact, `audience` doesn't filter at all.**\n\nConcrete contrast:\n\n- **`filters.deviceType: \"mobile\"`** → the funnel is computed over **only mobile sessions**. Every step in the response reflects mobile-only counts. Desktop sessions are gone from the dataset entirely.\n- **`audience: \"device_type\"`** → the **full dataset** (mobile + desktop) is funneled, but step 1 of the Sankey is **split into `\"Mobile\"` and `\"Desktop\"` nodes** so you can see how each device cohort flows down. Nothing is filtered out.\n\nTwo questions, two different answers:\n\n| Question                                                                                | Use                                               |\n| --------------------------------------------------------------------------------------- | ------------------------------------------------- |\n| \"How does the funnel look **for mobile traffic specifically**?\"                         | `filters: { deviceType: \"mobile\" }`               |\n| \"How does the funnel **split** between Mobile and Desktop visitors at the entry point?\" | `audience: \"device_type\"`                         |\n| \"How does the funnel split by channel, restricted to mobile US traffic?\"                | both: `audience: \"source_channel\"` + `filters: …` |\n\nThey compose without conflict — `audience` controls the rendering of step 1, `filters` controls what data feeds into the funnel in the first place.\n\n#### Supported `audience` values\n\n| `audience` value   | Step-1 nodes                                                                                               |\n| ------------------ | ---------------------------------------------------------------------------------------------------------- |\n| `\"device_type\"`    | `\"Mobile\"`, `\"Desktop\"`                                                                                    |\n| `\"visitor_type\"`   | `\"New\"`, `\"Returning\"`                                                                                     |\n| `\"source_channel\"` | Channel buckets: `\"Paid Social\"`, `\"Paid Search\"`, `\"Direct\"`, `\"Organic Social\"`, `\"Email\"`, `\"Other\"`, … |\n| `\"source_site\"`    | Referrer host buckets (`\"google.com\"`, `\"facebook.com\"`, …) with top-5 + `\"Other\"` rollup                  |\n\nThese four mirror the Customer Journey chart's audience selector exactly. The shared `AnalyticsAudienceType` enum also has `country_code` and `landing_page_full_path` values, but the funnel intentionally excludes those — they're not surfaced in the dashboard's funnel view, so the external API and MCP do not expose them either.\n\n#### Fallback on unrecognized values\n\nIf `audience` is set to any string outside the four supported values (e.g., `\"country_code\"`, `\"channel\"`, `\"new_vs_returning\"`, a typo), the request **does not 400** — the value silently falls back to `\"device_type\"` and a warning is logged server-side. This is deliberate so that LLM-driven callers that guess slightly-wrong dimension names still get a sensible funnel back instead of an opaque validation error.\n\nWhen `audience` is omitted entirely, the funnel uses its built-in default step-1 split (the same default the dashboard's Customer Journey chart starts on).\n\n### Response\n\nAbbreviated example (one path through all six steps). Note every node referenced by a `link` appears in `nodes`, and step numbers are contiguous — a real response has more nodes/links per step:\n\n```json\n{\n  \"data\": {\n    \"nodes\": [\n      { \"name\": \"Mobile\", \"step\": 1, \"value\": 8000, \"pct\": 0.8 },\n      { \"name\": \"Desktop\", \"step\": 1, \"value\": 2000, \"pct\": 0.2 },\n      { \"name\": \"Landing: PDP\", \"step\": 2, \"value\": 6500, \"pct\": 0.65 },\n      { \"name\": \"Bounced\", \"step\": 3, \"value\": 4200, \"pct\": 0.42 },\n      { \"name\": \"2nd Page: PDP\", \"step\": 3, \"value\": 2300, \"pct\": 0.23 },\n      {\n        \"name\": \"Exited before Add to Cart\",\n        \"step\": 4,\n        \"value\": 1500,\n        \"pct\": 0.15\n      },\n      { \"name\": \"Added to Cart\", \"step\": 4, \"value\": 800, \"pct\": 0.08 },\n      { \"name\": \"Started Checkout\", \"step\": 5, \"value\": 480, \"pct\": 0.048 },\n      { \"name\": \"Abandoned Cart\", \"step\": 5, \"value\": 320, \"pct\": 0.032 },\n      { \"name\": \"Converted\", \"step\": 6, \"value\": 300, \"pct\": 0.03 },\n      { \"name\": \"Abandoned Checkout\", \"step\": 6, \"value\": 180, \"pct\": 0.018 }\n    ],\n    \"links\": [\n      {\n        \"source\": \"Mobile\",\n        \"target\": \"Landing: PDP\",\n        \"step\": 1,\n        \"value\": 5200\n      },\n      {\n        \"source\": \"Desktop\",\n        \"target\": \"Landing: PDP\",\n        \"step\": 1,\n        \"value\": 1300\n      },\n      {\n        \"source\": \"Landing: PDP\",\n        \"target\": \"Bounced\",\n        \"step\": 2,\n        \"value\": 4200\n      },\n      {\n        \"source\": \"Landing: PDP\",\n        \"target\": \"2nd Page: PDP\",\n        \"step\": 2,\n        \"value\": 2300\n      },\n      {\n        \"source\": \"2nd Page: PDP\",\n        \"target\": \"Exited before Add to Cart\",\n        \"step\": 3,\n        \"value\": 1500\n      },\n      {\n        \"source\": \"2nd Page: PDP\",\n        \"target\": \"Added to Cart\",\n        \"step\": 3,\n        \"value\": 800\n      },\n      {\n        \"source\": \"Added to Cart\",\n        \"target\": \"Started Checkout\",\n        \"step\": 4,\n        \"value\": 480\n      },\n      {\n        \"source\": \"Added to Cart\",\n        \"target\": \"Abandoned Cart\",\n        \"step\": 4,\n        \"value\": 320\n      },\n      {\n        \"source\": \"Started Checkout\",\n        \"target\": \"Converted\",\n        \"step\": 5,\n        \"value\": 300\n      },\n      {\n        \"source\": \"Started Checkout\",\n        \"target\": \"Abandoned Checkout\",\n        \"step\": 5,\n        \"value\": 180\n      }\n    ]\n  }\n}\n```\n\nEvery node a link references is present in `nodes`, steps run 1→6 with no gaps, and each `link.step` equals its source node's step. `pct` values are all fractions of the step-1 total (10,000 here).\n\n- **`nodes`** — one entry per labeled state at each step. Ordered by `(step ascending, value descending)`.\n  - `name` — node label (e.g. `\"Mobile\"`, `\"Landing: PDP\"`, `\"Bounced\"`, `\"Added to Cart\"`).\n  - `step` — 1-indexed step position in the funnel.\n  - `value` — visitor count at this node.\n  - `pct` — share of step-1 visitors that reached this node, as a fraction in `[0, 1]` (not a percent).\n- **`links`** — one entry per transition between adjacent step nodes. Ordered by `(step ascending, value descending)`.\n  - `source` / `target` — node names on either end of the transition.\n  - `step` — step of the source node.\n  - `value` — visitor count traversing this link.\n\n#### Server-side bucketing\n\nAt each step the server keeps the top 5 entries by traffic and rolls everything else into `\"Other\"`. Two special node names are reserved:\n\n- `\"Bounced\"` — sessions that ended before reaching a second page.\n- `\"Landing: Other\"` / `\"2nd Page: Other\"` — catch-all buckets for low-volume landing or second-page types.\n\nThis is the same shape the Intelligems dashboard renders; there is no \"unbucketed\" mode.\n\n### Rate limits\n\nSame rate limit as the other `/analytics/sitewide/*` endpoints. Aggregated, cacheable data — see the Rate Limiting Reference.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"description":"Start of analysis period as an ISO 8601 datetime string (e.g. '2025-01-01T00:00:00.000-05:00'). Defaults to 30 days ago.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"description":"End of analysis period as an ISO 8601 datetime string. Defaults to now.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"filters":{"description":"Optional analytics filters object. See the Filters Reference for available filter fields (country, device, visitor type, sourceSitesOrChannels, landingPageTypes, etc.). These narrow the underlying dataset and are distinct from `audience`, which pivots step 1.","type":"object","properties":{"deviceType":{"description":"Filter by device type. Options: 'any' (disables filter), 'mobile', 'desktop'. Omit or null to include all devices.","anyOf":[{"type":"string","enum":["any","mobile","desktop"]},{"type":"null"}]},"visitorType":{"description":"Filter by visitor type. Options: 'any' (disables filter), 'new', 'returning'. Omit or null to include all visitors.","anyOf":[{"type":"string","enum":["any","new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. Array of channel names: 'Referral', 'All Social', 'Organic Social', 'Paid Social', 'Organic Search', 'Paid Search', 'Paid Shopping', 'Email', 'Google', 'Facebook', 'Instagram', 'Linktree', 'TikTok', 'Twitter', 'Direct', 'SMS', 'Meta', 'Link Tree', 'Wunderkind Text', 'Youtube', 'Other', 'any'. Omit or pass empty array for all channels.","type":"array","items":{"type":"string","enum":["Referral","All Social","Organic Social","Paid Social","Organic Search","Paid Search","Paid Shopping","Email","Google","Facebook","Instagram","Linktree","TikTok","Twitter","Direct","SMS","Other","Meta","Link Tree","Wunderkind Text","Youtube","Affiliate","any"]}},"landingPage":{"description":"DEPRECATED — use landingPageFilters instead, which supports multiple values and an and/or operator. This single-path filter is retained for backwards compatibility and still works, but new integrations should use landingPageFilters. Filter by landing page URL path. Object with: landingPageUrlPath (string|null — the path to match), landingPageUrlPathFilterType (match operator|null: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull'). For 'isNull'/'isNotNull' operators, set landingPageUrlPath to null. Note: 'regex' is NOT supported here (unlike urlParam).","deprecated":true,"anyOf":[{"type":"object","properties":{"landingPageUrlPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"landingPageUrlPathFilterType":{"anyOf":[{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]},{"type":"null"}]}},"required":["landingPageUrlPath","landingPageUrlPathFilterType"]},{"type":"null"}]},"landingPageFilters":{"description":"Filter by landing page URL path with multi-value support. Recommended landing page filter (supersedes the deprecated landingPage field). Array of filter items, each with: filterType (match operator: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull') and values (array of strings to match against — omit for 'isNull'/'isNotNull'). Multiple values within a single item are OR'd. How items in the array are combined is controlled by landingPageFiltersOperator.","type":"array","items":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"filterType":{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]}},"required":["filterType"]}},"landingPageFiltersOperator":{"description":"How multiple items in landingPageFilters are combined. 'or' (default) — session matches if any filter item matches. 'and' — session must match every filter item.","type":"string","enum":["or","and"]},"countryCodes":{"description":"Filter by ISO 3166-1 alpha-2 country codes (e.g. ['US', 'GB', 'CA']). Omit or pass empty array for all countries.","type":"array","items":{"type":"string"}},"countryCodesFilterType":{"description":"How countryCodes should be matched: 'include' (only visitors in the listed countries) or 'exclude' (visitors in any country except the listed ones). Defaults to 'include' when omitted. Requires countryCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"currencyCodes":{"description":"Filter by ISO 4217 order currency codes (e.g. ['USD', 'GBP', 'CAD']). Matches the currency an order was placed in. Omit or pass empty array for all currencies.","type":"array","items":{"type":"string"}},"currencyCodesFilterType":{"description":"How currencyCodes should be matched: 'include' (only orders in the listed currencies) or 'exclude' (orders in any currency except the listed ones). Defaults to 'include' when omitted. Requires currencyCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"maxZScore":{"description":"Maximum Z-score threshold for outlier filtering on order revenue. Visitors with orders whose Z-score exceeds this value are excluded. Accepts number or numeric string. Null or omit to disable outlier filtering.","anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"onlyProductIds":{"description":"Filter to orders containing at least one of these Shopify product IDs (numeric strings, e.g. ['1234567890', '9876543210']). Omit or pass an empty array for all products.","type":"array","items":{"type":"string"}},"landingPageTypes":{"description":"Filter sessions by landing page types. An array of values from: 'PDP', 'Collection', 'Content', 'Blog', 'Homepage', 'Search', 'Cart', 'Other'. Omit or null to include all landing page types.","type":"array","items":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}}}},"audience":{"default":"device_type","description":"Optional dimension that pivots the funnel's step-1 entry-point nodes. This does NOT filter the dataset — it only changes which buckets are rendered at step 1 (Mobile vs. Desktop, New vs. Returning, channel breakdown, source-site breakdown). To narrow the dataset to a single segment, use the `filters` object instead. Supported values: 'device_type' (Mobile vs Desktop), 'visitor_type' (New vs Returning), 'source_channel' (Paid Social, Paid Search, Direct, ...), 'source_site' (referrer host buckets). Any other value (typo, unsupported dimension, wrong type) silently falls back to 'device_type'. Mirrors the Customer Journey chart's audience selector in the Intelligems dashboard.","type":"string","enum":["device_type","visitor_type","source_channel","source_site"]},"conversionFunnel":{"description":"Optional funnel-specific filters. Stage flags (addedToCart, startedCheckout, converted, bounced, abandonedCart, abandonedCheckout, exitedBeforeAtc, viewedCollectionPage, viewedProductPage) narrow the funnel input to sessions that hit that behavioral stage. landingPageType / secondPageType pin the funnel to a single landing-page or second-page journey (Supported page types: PDP, Collection, Content, Blog, Homepage, Search, Cart, Other). Equivalent to the clickable node filters in the Intelligems dashboard.","type":"object","properties":{"abandonedCart":{"type":"boolean"},"abandonedCheckout":{"type":"boolean"},"addedToCart":{"type":"boolean"},"bounced":{"type":"boolean"},"converted":{"type":"boolean"},"exitedBeforeAtc":{"type":"boolean"},"startedCheckout":{"type":"boolean"},"viewedCollectionPage":{"type":"boolean"},"viewedProductPage":{"type":"boolean"},"landingPageType":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]},"secondPageType":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}}}}}}}},"responses":{"200":{"description":"OK","headers":{"access-control-allow-origin":{"schema":{"type":"string"},"description":"CORS allow-origin header."},"access-control-allow-credentials":{"schema":{"type":"string"},"description":"CORS allow-credentials header."},"content-type":{"schema":{"type":"string"},"description":"Response content type."},"Timing-Allow-Origin":{"schema":{"type":"string"},"description":"Allowed origin for Timing headers."}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"nodes":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Node label, e.g. 'Mobile', 'Landing: PDP', 'Bounced', 'Added to Cart'."},"step":{"type":"number","description":"1-indexed step position in the funnel."},"value":{"type":"number","description":"Number of visitors at this node."},"pct":{"type":"number","description":"Share of step-1 visitors that reached this node, as a fraction in [0, 1] (not a percent)."}},"required":["name","step","value","pct"],"additionalProperties":false},"description":"Sankey nodes — one per labeled state at each step in the funnel. Ordered by (step ascending, value descending)."},"links":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"Name of the source node for this transition."},"target":{"type":"string","description":"Name of the target node for this transition."},"step":{"type":"number","description":"Step of the source node."},"value":{"type":"number","description":"Number of visitors traversing this link."}},"required":["source","target","step","value"],"additionalProperties":false},"description":"Sankey links — one per transition between adjacent step nodes. Ordered by (step ascending, value descending)."}},"required":["nodes","links"],"additionalProperties":false,"description":"Sankey graph representation of the conversion funnel. Contains `nodes` (one per labeled state at each step) and `links` (transitions between adjacent steps). Server-side bucketing keeps only the top 5 entries per step plus catch-all 'Other' / 'Bounced' rollups."}},"required":["data"],"additionalProperties":false}}}}}}}}}
````

## POST /v25-10-beta/analytics/sitewide/order-distribution

> Retrieve order value distribution data and unit mix breakdowns for a time window.\
> \
> The response returns \`orderValueDistribution.kernel\_density\_estimate\` and \`orderValueDistribution.cumulative\_distribution\_function\`, plus \`orderBreakdown\`.

```json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Production"}],"paths":{"/v25-10-beta/analytics/sitewide/order-distribution":{"post":{"tags":["Fetch Sitewide Analytics"],"description":"Retrieve order value distribution data and unit mix breakdowns for a time window.\n\nThe response returns `orderValueDistribution.kernel_density_estimate` and `orderValueDistribution.cumulative_distribution_function`, plus `orderBreakdown`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"description":"Start of analysis period as an ISO 8601 datetime string (e.g. '2025-01-01T00:00:00.000-05:00'). Defaults to 30 days ago.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"description":"End of analysis period as an ISO 8601 datetime string. Defaults to now.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"filters":{"description":"Optional analytics filters object. See the Filters Reference for available filter fields.","type":"object","properties":{"deviceType":{"description":"Filter by device type. Options: 'any' (disables filter), 'mobile', 'desktop'. Omit or null to include all devices.","anyOf":[{"type":"string","enum":["any","mobile","desktop"]},{"type":"null"}]},"visitorType":{"description":"Filter by visitor type. Options: 'any' (disables filter), 'new', 'returning'. Omit or null to include all visitors.","anyOf":[{"type":"string","enum":["any","new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. Array of channel names: 'Referral', 'All Social', 'Organic Social', 'Paid Social', 'Organic Search', 'Paid Search', 'Paid Shopping', 'Email', 'Google', 'Facebook', 'Instagram', 'Linktree', 'TikTok', 'Twitter', 'Direct', 'SMS', 'Meta', 'Link Tree', 'Wunderkind Text', 'Youtube', 'Other', 'any'. Omit or pass empty array for all channels.","type":"array","items":{"type":"string","enum":["Referral","All Social","Organic Social","Paid Social","Organic Search","Paid Search","Paid Shopping","Email","Google","Facebook","Instagram","Linktree","TikTok","Twitter","Direct","SMS","Other","Meta","Link Tree","Wunderkind Text","Youtube","Affiliate","any"]}},"landingPage":{"description":"DEPRECATED — use landingPageFilters instead, which supports multiple values and an and/or operator. This single-path filter is retained for backwards compatibility and still works, but new integrations should use landingPageFilters. Filter by landing page URL path. Object with: landingPageUrlPath (string|null — the path to match), landingPageUrlPathFilterType (match operator|null: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull'). For 'isNull'/'isNotNull' operators, set landingPageUrlPath to null. Note: 'regex' is NOT supported here (unlike urlParam).","deprecated":true,"anyOf":[{"type":"object","properties":{"landingPageUrlPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"landingPageUrlPathFilterType":{"anyOf":[{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]},{"type":"null"}]}},"required":["landingPageUrlPath","landingPageUrlPathFilterType"]},{"type":"null"}]},"landingPageFilters":{"description":"Filter by landing page URL path with multi-value support. Recommended landing page filter (supersedes the deprecated landingPage field). Array of filter items, each with: filterType (match operator: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull') and values (array of strings to match against — omit for 'isNull'/'isNotNull'). Multiple values within a single item are OR'd. How items in the array are combined is controlled by landingPageFiltersOperator.","type":"array","items":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"filterType":{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]}},"required":["filterType"]}},"landingPageFiltersOperator":{"description":"How multiple items in landingPageFilters are combined. 'or' (default) — session matches if any filter item matches. 'and' — session must match every filter item.","type":"string","enum":["or","and"]},"countryCodes":{"description":"Filter by ISO 3166-1 alpha-2 country codes (e.g. ['US', 'GB', 'CA']). Omit or pass empty array for all countries.","type":"array","items":{"type":"string"}},"countryCodesFilterType":{"description":"How countryCodes should be matched: 'include' (only visitors in the listed countries) or 'exclude' (visitors in any country except the listed ones). Defaults to 'include' when omitted. Requires countryCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"currencyCodes":{"description":"Filter by ISO 4217 order currency codes (e.g. ['USD', 'GBP', 'CAD']). Matches the currency an order was placed in. Omit or pass empty array for all currencies.","type":"array","items":{"type":"string"}},"currencyCodesFilterType":{"description":"How currencyCodes should be matched: 'include' (only orders in the listed currencies) or 'exclude' (orders in any currency except the listed ones). Defaults to 'include' when omitted. Requires currencyCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"maxZScore":{"description":"Maximum Z-score threshold for outlier filtering on order revenue. Visitors with orders whose Z-score exceeds this value are excluded. Accepts number or numeric string. Null or omit to disable outlier filtering.","anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"onlyProductIds":{"description":"Filter to orders containing at least one of these Shopify product IDs (numeric strings, e.g. ['1234567890', '9876543210']). Omit or pass an empty array for all products.","type":"array","items":{"type":"string"}},"landingPageTypes":{"description":"Filter sessions by landing page types. An array of values from: 'PDP', 'Collection', 'Content', 'Blog', 'Homepage', 'Search', 'Cart', 'Other'. Omit or null to include all landing page types.","type":"array","items":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}},"allOrders":{"description":"Whether to include all orders or only matched orders.","type":"boolean"}}}}}}}},"responses":{"200":{"description":"OK","headers":{"access-control-allow-origin":{"schema":{"type":"string"},"description":"CORS allow-origin header."},"access-control-allow-credentials":{"schema":{"type":"string"},"description":"CORS allow-credentials header."},"content-type":{"schema":{"type":"string"},"description":"Response content type."},"Timing-Allow-Origin":{"schema":{"type":"string"},"description":"Allowed origin for Timing headers."}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code for monetary values (e.g. 'USD')."},"orderValueDistribution":{"type":"object","properties":{"kernel_density_estimate":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"current_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"previous_period":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["x","current_period","previous_period"],"additionalProperties":false},"description":"Kernel density estimation curve points for order value distribution. Each point has an `x` (order value), `current_period`, and `previous_period` field. A period with no orders is `null` at every point (no distribution to compare) rather than 0."},"cumulative_distribution_function":{"type":"array","items":{"type":"object","properties":{"x":{"type":"number"},"current_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"previous_period":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["x","current_period","previous_period"],"additionalProperties":false},"description":"Cumulative distribution function curve points for order value distribution. Each point has an `x` (order value), `current_period`, and `previous_period` field. A period with no orders is `null` at every point (no distribution to compare) rather than 0."}},"required":["kernel_density_estimate","cumulative_distribution_function"],"additionalProperties":false,"description":"Order value distribution object containing `kernel_density_estimate` and `cumulative_distribution_function` arrays. Each point has an `x` (order value), `current_period`, and `previous_period` field. `current_period`/`previous_period` are `null` for every point of a period that had no orders in its window."},"orderBreakdown":{"type":"array","items":{"type":"object","properties":{"unit_quantity":{"type":"number"},"n_orders":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false},"net_revenue":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false},"gross_profit":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false},"pct_orders_by_unit_quantity":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false},"pct_revenue_by_unit_quantity":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false},"pct_profit_by_unit_quantity":{"type":"object","properties":{"value":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["value"],"additionalProperties":false}},"required":["unit_quantity","n_orders","net_revenue","gross_profit","pct_orders_by_unit_quantity","pct_revenue_by_unit_quantity","pct_profit_by_unit_quantity"],"additionalProperties":false},"description":"Breakdown of orders, revenue, and profit by number of units per order. Each entry has unit_quantity and metric values (n_orders, net_revenue, gross_profit as value objects, plus percentage equivalents)."}},"required":["currency","orderValueDistribution","orderBreakdown"],"additionalProperties":false}}}}}}}}}
```

## POST /v25-10-beta/analytics/sitewide/snapshot

> Retrieve sitewide snapshot metrics for a time window.\
> \
> The optional \`feature\` parameter is an object, not a string enum.\
> \
> Use \`{ "name": "performance" }\` for the core KPI subset, \`{ "name": "audience", "audience": "device\_type" }\` for audience snapshots, \`{ "name": "order" }\` for order-focused snapshot metrics, or \`{ "name": "conversion" }\` for conversion funnel snapshot metrics. Omitting \`feature\` entirely returns the full sitewide metric set.\
> \
> \### Response Structure\
> \
> The response is a JSON object keyed by segment name, \*\*not\*\* a flat object with top-level metric fields.\
> \
> When no audience feature is specified (or \`feature.name\` is \`"performance"\`, \`"order"\`, or \`"conversion"\`), the response contains a single \`"All"\` key:\
> \
> \`\`\`json\
> {\
> &#x20; "All": {\
> &#x20;   "currency": "USD",\
> &#x20;   "n\_visitors": { "value": 52763, "pct\_change": 0.12 },\
> &#x20;   "conversion\_rate": { "value": 0.034, "pct\_change": -0.05 },\
> &#x20;   ...\
> &#x20; }\
> }\
> \`\`\`\
> \
> When \`feature.name\` is \`"audience"\`, the response contains one key per audience segment plus a \`"\_\_total"\` key:\
> \
> \`\`\`json\
> {\
> &#x20; "Desktop": { "currency": "USD", "n\_visitors": { "value": 30000, "pct\_change": 0.08 }, ... },\
> &#x20; "Mobile": { "currency": "USD", "n\_visitors": { "value": 22763, "pct\_change": 0.18 }, ... },\
> &#x20; "\_\_total": { "currency": "USD", "n\_visitors": { "value": 52763, "pct\_change": 0.12 }, ... }\
> }\
> \`\`\`\
> \
> Each segment object contains \`currency\` (string), the COGS metadata fields \`cogs\_configured\` (boolean) and \`cogs\_coverage\_pct\` (number), and metric fields. The two \`cogs\_\*\` fields are present for the \`performance\`, \`order\`, and \`audience\` features but omitted for \`conversion\`. Each metric field is an object with \`value\` (number) and \`pct\_change\` (number) representing the percent change versus the comparison period. In audience view, per-segment metrics also include \`pct\_impact\_to\_total\_change\` (number), and the \`\_\_total\` segment additionally includes \`impact\_from\_visitor\_mix\_shift\` (number).\
> \
> Alongside \`currency\`, every segment also includes two scalar COGS-status fields (not \`{ value, pct\_change }\` objects): \`cogs\_configured\` (boolean — whether cost-of-goods data is configured for the store) and \`cogs\_coverage\_pct\` (number, a fraction in \`\[0, 1]\` for the share of revenue with COGS data).\
> \
> COGS-dependent profit metrics — \`gross\_profit\`, \`gross\_profit\_per\_visitor\`, and \`gross\_margin\_pct\` — are returned as a bare \`null\` (not a \`{ value, pct\_change }\` object) when \`cogs\_configured\` is \`false\`. Clients must null-check these fields before reading \`.value\`/\`.pct\_change\`.\
> \
> \### Metric Availability by Feature\
> \
> \- \`performance\` returns this KPI subset: \`n\_visitors\`, \`conversion\_rate\`, \`n\_orders\`, \`aov\`, \`net\_revenue\`, \`gross\_profit\`, \`gross\_profit\_per\_visitor\`, \`net\_revenue\_per\_visitor\`, \`gross\_margin\_pct\`, \`average\_discount\`, \`pct\_revenue\_with\_cogs\`.\
> \- \`order\` returns this subset: \`aov\`, \`n\_visitors\`, \`n\_orders\`, \`median\_order\_value\`, \`average\_units\_per\_order\`, \`pct\_orders\_with\_free\_shipping\`, \`net\_shipping\_revenue\_per\_order\`.\
> \- \`conversion\` returns this subset: \`viewed\_collection\_page\_rate\`, \`viewed\_product\_page\_rate\`, \`add\_to\_cart\_rate\`, \`checkout\_begin\_rate\`, \`conversion\_rate\`, \`bounce\_rate\`, \`abandoned\_cart\_rate\`, \`abandoned\_checkout\_rate\`.\
> \- \`audience\` returns per-segment metrics plus a \`\_\_total\` key:\
> &#x20; \`n\_sessions\`, \`n\_visitors\`, \`n\_orders\`, \`gross\_revenue\`, \`net\_revenue\`, \`order\_cogs\`, \`conversion\_rate\`, \`aov\`, \`net\_revenue\_per\_visitor\`, \`shipping\_cost\`, \`transaction\_fees\`, \`tax\`, \`gross\_profit\`, \`gross\_profit\_per\_visitor\`, \`oli\_net\_product\_revenue\_with\_cogs\`, \`oli\_net\_product\_revenue\`, \`pct\_revenue\_with\_cogs\`.

````json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Production"}],"paths":{"/v25-10-beta/analytics/sitewide/snapshot":{"post":{"tags":["Fetch Sitewide Analytics"],"description":"Retrieve sitewide snapshot metrics for a time window.\n\nThe optional `feature` parameter is an object, not a string enum.\n\nUse `{ \"name\": \"performance\" }` for the core KPI subset, `{ \"name\": \"audience\", \"audience\": \"device_type\" }` for audience snapshots, `{ \"name\": \"order\" }` for order-focused snapshot metrics, or `{ \"name\": \"conversion\" }` for conversion funnel snapshot metrics. Omitting `feature` entirely returns the full sitewide metric set.\n\n### Response Structure\n\nThe response is a JSON object keyed by segment name, **not** a flat object with top-level metric fields.\n\nWhen no audience feature is specified (or `feature.name` is `\"performance\"`, `\"order\"`, or `\"conversion\"`), the response contains a single `\"All\"` key:\n\n```json\n{\n  \"All\": {\n    \"currency\": \"USD\",\n    \"n_visitors\": { \"value\": 52763, \"pct_change\": 0.12 },\n    \"conversion_rate\": { \"value\": 0.034, \"pct_change\": -0.05 },\n    ...\n  }\n}\n```\n\nWhen `feature.name` is `\"audience\"`, the response contains one key per audience segment plus a `\"__total\"` key:\n\n```json\n{\n  \"Desktop\": { \"currency\": \"USD\", \"n_visitors\": { \"value\": 30000, \"pct_change\": 0.08 }, ... },\n  \"Mobile\": { \"currency\": \"USD\", \"n_visitors\": { \"value\": 22763, \"pct_change\": 0.18 }, ... },\n  \"__total\": { \"currency\": \"USD\", \"n_visitors\": { \"value\": 52763, \"pct_change\": 0.12 }, ... }\n}\n```\n\nEach segment object contains `currency` (string), the COGS metadata fields `cogs_configured` (boolean) and `cogs_coverage_pct` (number), and metric fields. The two `cogs_*` fields are present for the `performance`, `order`, and `audience` features but omitted for `conversion`. Each metric field is an object with `value` (number) and `pct_change` (number) representing the percent change versus the comparison period. In audience view, per-segment metrics also include `pct_impact_to_total_change` (number), and the `__total` segment additionally includes `impact_from_visitor_mix_shift` (number).\n\nAlongside `currency`, every segment also includes two scalar COGS-status fields (not `{ value, pct_change }` objects): `cogs_configured` (boolean — whether cost-of-goods data is configured for the store) and `cogs_coverage_pct` (number, a fraction in `[0, 1]` for the share of revenue with COGS data).\n\nCOGS-dependent profit metrics — `gross_profit`, `gross_profit_per_visitor`, and `gross_margin_pct` — are returned as a bare `null` (not a `{ value, pct_change }` object) when `cogs_configured` is `false`. Clients must null-check these fields before reading `.value`/`.pct_change`.\n\n### Metric Availability by Feature\n\n- `performance` returns this KPI subset: `n_visitors`, `conversion_rate`, `n_orders`, `aov`, `net_revenue`, `gross_profit`, `gross_profit_per_visitor`, `net_revenue_per_visitor`, `gross_margin_pct`, `average_discount`, `pct_revenue_with_cogs`.\n- `order` returns this subset: `aov`, `n_visitors`, `n_orders`, `median_order_value`, `average_units_per_order`, `pct_orders_with_free_shipping`, `net_shipping_revenue_per_order`.\n- `conversion` returns this subset: `viewed_collection_page_rate`, `viewed_product_page_rate`, `add_to_cart_rate`, `checkout_begin_rate`, `conversion_rate`, `bounce_rate`, `abandoned_cart_rate`, `abandoned_checkout_rate`.\n- `audience` returns per-segment metrics plus a `__total` key:\n  `n_sessions`, `n_visitors`, `n_orders`, `gross_revenue`, `net_revenue`, `order_cogs`, `conversion_rate`, `aov`, `net_revenue_per_visitor`, `shipping_cost`, `transaction_fees`, `tax`, `gross_profit`, `gross_profit_per_visitor`, `oli_net_product_revenue_with_cogs`, `oli_net_product_revenue`, `pct_revenue_with_cogs`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"description":"Start of analysis period as an ISO 8601 datetime string (e.g. '2025-01-01T00:00:00.000-05:00'). Defaults to 30 days ago.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"description":"End of analysis period as an ISO 8601 datetime string. Defaults to now.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"filters":{"description":"Optional analytics filters object. See the Filters Reference for available filter fields.","type":"object","properties":{"deviceType":{"description":"Filter by device type. Options: 'any' (disables filter), 'mobile', 'desktop'. Omit or null to include all devices.","anyOf":[{"type":"string","enum":["any","mobile","desktop"]},{"type":"null"}]},"visitorType":{"description":"Filter by visitor type. Options: 'any' (disables filter), 'new', 'returning'. Omit or null to include all visitors.","anyOf":[{"type":"string","enum":["any","new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. Array of channel names: 'Referral', 'All Social', 'Organic Social', 'Paid Social', 'Organic Search', 'Paid Search', 'Paid Shopping', 'Email', 'Google', 'Facebook', 'Instagram', 'Linktree', 'TikTok', 'Twitter', 'Direct', 'SMS', 'Meta', 'Link Tree', 'Wunderkind Text', 'Youtube', 'Other', 'any'. Omit or pass empty array for all channels.","type":"array","items":{"type":"string","enum":["Referral","All Social","Organic Social","Paid Social","Organic Search","Paid Search","Paid Shopping","Email","Google","Facebook","Instagram","Linktree","TikTok","Twitter","Direct","SMS","Other","Meta","Link Tree","Wunderkind Text","Youtube","Affiliate","any"]}},"landingPage":{"description":"DEPRECATED — use landingPageFilters instead, which supports multiple values and an and/or operator. This single-path filter is retained for backwards compatibility and still works, but new integrations should use landingPageFilters. Filter by landing page URL path. Object with: landingPageUrlPath (string|null — the path to match), landingPageUrlPathFilterType (match operator|null: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull'). For 'isNull'/'isNotNull' operators, set landingPageUrlPath to null. Note: 'regex' is NOT supported here (unlike urlParam).","deprecated":true,"anyOf":[{"type":"object","properties":{"landingPageUrlPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"landingPageUrlPathFilterType":{"anyOf":[{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]},{"type":"null"}]}},"required":["landingPageUrlPath","landingPageUrlPathFilterType"]},{"type":"null"}]},"landingPageFilters":{"description":"Filter by landing page URL path with multi-value support. Recommended landing page filter (supersedes the deprecated landingPage field). Array of filter items, each with: filterType (match operator: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull') and values (array of strings to match against — omit for 'isNull'/'isNotNull'). Multiple values within a single item are OR'd. How items in the array are combined is controlled by landingPageFiltersOperator.","type":"array","items":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"filterType":{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]}},"required":["filterType"]}},"landingPageFiltersOperator":{"description":"How multiple items in landingPageFilters are combined. 'or' (default) — session matches if any filter item matches. 'and' — session must match every filter item.","type":"string","enum":["or","and"]},"countryCodes":{"description":"Filter by ISO 3166-1 alpha-2 country codes (e.g. ['US', 'GB', 'CA']). Omit or pass empty array for all countries.","type":"array","items":{"type":"string"}},"countryCodesFilterType":{"description":"How countryCodes should be matched: 'include' (only visitors in the listed countries) or 'exclude' (visitors in any country except the listed ones). Defaults to 'include' when omitted. Requires countryCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"currencyCodes":{"description":"Filter by ISO 4217 order currency codes (e.g. ['USD', 'GBP', 'CAD']). Matches the currency an order was placed in. Omit or pass empty array for all currencies.","type":"array","items":{"type":"string"}},"currencyCodesFilterType":{"description":"How currencyCodes should be matched: 'include' (only orders in the listed currencies) or 'exclude' (orders in any currency except the listed ones). Defaults to 'include' when omitted. Requires currencyCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"maxZScore":{"description":"Maximum Z-score threshold for outlier filtering on order revenue. Visitors with orders whose Z-score exceeds this value are excluded. Accepts number or numeric string. Null or omit to disable outlier filtering.","anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"onlyProductIds":{"description":"Filter to orders containing at least one of these Shopify product IDs (numeric strings, e.g. ['1234567890', '9876543210']). Omit or pass an empty array for all products.","type":"array","items":{"type":"string"}},"landingPageTypes":{"description":"Filter sessions by landing page types. An array of values from: 'PDP', 'Collection', 'Content', 'Blog', 'Homepage', 'Search', 'Cart', 'Other'. Omit or null to include all landing page types.","type":"array","items":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}},"allOrders":{"description":"Whether to include all orders or only matched orders.","type":"boolean"}}},"feature":{"description":"Optional feature selector object. Omit it or use `{ \"name\": \"performance\" }` for sitewide KPI snapshots, `{ \"name\": \"audience\", \"audience\": \"device_type\" }` for audience segment snapshots, `{ \"name\": \"order\" }` for order-focused metrics, or `{ \"name\": \"conversion\" }` for conversion funnel metrics.","oneOf":[{"type":"object","properties":{"name":{"type":"string","const":"performance"}},"required":["name"]},{"type":"object","properties":{"name":{"type":"string","const":"audience"},"audience":{"type":"string","enum":["device_type","visitor_type","source_channel","source_site","country_code","landing_page_full_path"],"description":"Optional audience breakdown dimension. When provided, returns per-segment snapshot instead of site-level KPIs. Supported values: device_type, visitor_type, source_channel, source_site, country_code, landing_page_full_path."}},"required":["name","audience"]},{"type":"object","properties":{"name":{"type":"string","const":"order"}},"required":["name"]},{"type":"object","properties":{"name":{"type":"string","const":"conversion"}},"required":["name"]}],"type":"object"}}}}}},"responses":{"200":{"description":"OK","headers":{"access-control-allow-origin":{"schema":{"type":"string"},"description":"CORS allow-origin header."},"access-control-allow-credentials":{"schema":{"type":"string"},"description":"CORS allow-credentials header."},"content-type":{"schema":{"type":"string"},"description":"Response content type."},"Timing-Allow-Origin":{"schema":{"type":"string"},"description":"Allowed origin for Timing headers."}},"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"currency":{"description":"ISO 4217 currency code for monetary values (e.g. 'USD').","type":"string"},"cogs_configured":{"description":"Whether cost of goods sold (COGS) is configured for this segment. When false, profit metrics (gross_profit, gross_profit_per_visitor, gross_margin_pct) are null because they cannot be computed.","type":"boolean"},"cogs_coverage_pct":{"description":"Fraction of revenue (0-1) backed by line items that have COGS data. 0 means profit metrics are unavailable and returned as null; a value between 0 and 1 means profit reflects partial COGS coverage; 1 means full coverage.","type":"number"},"n_sessions":{"description":"Total number of sessions during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"n_visitors":{"description":"Total number of unique visitors during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"n_orders":{"description":"Total number of orders during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"gross_revenue":{"description":"Total gross revenue before discounts and returns.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"net_revenue":{"description":"Total net revenue during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"order_cogs":{"description":"Total cost of goods sold for all orders.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"lost_net_revenue":{"description":"Net revenue lost from returns and cancellations during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"discounts":{"description":"Total discount amount applied across all orders.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"average_discount":{"description":"Average discount rate during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"conversion_rate":{"description":"Overall site conversion rate during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"aov":{"description":"Average order value during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"net_revenue_per_visitor":{"description":"Average net revenue per visitor during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"discount_per_unit":{"description":"Average discount amount per unit sold.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"shipping_cost":{"description":"Total shipping cost across all orders.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"transaction_fees":{"description":"Total transaction/payment processing fees.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"tax":{"description":"Total tax collected across all orders.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"gross_profit":{"description":"Total gross profit during the period. Requires COGS to be configured; null when COGS are not configured (cogs_configured is false). Reflects partial COGS coverage when cogs_coverage_pct is between 0 and 1.","anyOf":[{"type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"gross_margin_pct":{"description":"Gross margin as a percentage of net revenue. Null when COGS are not configured (cogs_configured is false).","anyOf":[{"type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"gross_profit_per_visitor":{"description":"Average gross profit per visitor during the period. Requires COGS to be configured; null when COGS are not configured (cogs_configured is false). Reflects partial COGS coverage when cogs_coverage_pct is between 0 and 1.","anyOf":[{"type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"oli_net_product_revenue_with_cogs":{"description":"Net product revenue for line items that have cost of goods data.","anyOf":[{"type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"oli_net_product_revenue":{"description":"Net product revenue at the order line item level.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"median_order_value":{"description":"Median order value during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"average_units_per_order":{"description":"Average number of units per order.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"pct_orders_with_free_shipping":{"description":"Percentage of orders with free shipping during the period.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"net_shipping_revenue_per_order":{"description":"Average net shipping revenue collected per order.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"pct_revenue_with_cogs":{"description":"Percentage of revenue from products that have cost of goods (COGS) data. When 0, profit metrics (gross_profit, gross_profit_per_visitor, gross_margin_pct) are unavailable and returned as null. See cogs_configured / cogs_coverage_pct.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"viewed_collection_page_rate":{"description":"Percentage of sessions that viewed a collection page.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"viewed_product_page_rate":{"description":"Percentage of sessions that viewed a product detail page.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"add_to_cart_rate":{"description":"Percentage of sessions that added at least one product to cart.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"checkout_begin_rate":{"description":"Percentage of sessions that started the checkout flow.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"bounce_rate":{"description":"Percentage of sessions that ended without navigating to a second page.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"abandoned_cart_rate":{"description":"Percentage of sessions that added to cart but did not convert.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},"abandoned_checkout_rate":{"description":"Percentage of sessions that started checkout but did not convert.","type":"object","properties":{"pct_change":{"anyOf":[{"type":"number"},{"type":"null"}]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"pct_impact_to_total_change":{"description":"For audience snapshots, each segment's percent contribution to the metric's total percent change over the comparison period.","anyOf":[{"type":"number"},{"type":"null"}]},"impact_from_visitor_mix_shift":{"description":"For audience ratio metrics on the __total row, the percent change impact attributed to shifts in visitor mix between segments.","anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false}},"additionalProperties":false}}}}}}}}}}
````

## POST /v25-10-beta/analytics/sitewide/timeseries

> Returns sitewide KPI time-series data with configurable granularity and optional audience segmentation.\
> \
> \### Parameters\
> \
> \- \`granularity\` — optional time bucketing: \`day\`, \`week\` (default), or \`month\`\
> \- \`feature\` — optional feature selector object:\
> &#x20; \- \`{ "name": "performance" }\` for the core KPI subset in an \`"All"\` segment\
> &#x20; \- omit \`feature\` entirely for the full sitewide metric set in an \`"All"\` segment\
> &#x20; \- \`{ "name": "audience", "audience": "device\_type" }\` for per-segment audience timeseries\
> &#x20; \- \`{ "name": "order" }\` for order-focused timeseries\
> &#x20; \- \`{ "name": "conversion" }\` for conversion funnel timeseries\
> \
> \### \`dt\` Field Format\
> \
> \`dt\` is returned as a formatted date string (not Unix epoch). Format is \`"YYYY-MM-DDTHH:mm:ss"\` for all granularities (\`day\`, \`week\`, and \`month\`).\
> \
> \### Response Notes\
> \
> \- Each data point contains \`dt\` plus one or more numeric KPI fields (for example: \`n\_visitors\`, \`conversion\_rate\`, \`n\_orders\`, \`aov\`, \`net\_revenue\`, \`gross\_profit\`).\
> \- Each segment can include a \`summary\` object with aggregate totals in addition to the \`data\` array.

```json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Production"}],"paths":{"/v25-10-beta/analytics/sitewide/timeseries":{"post":{"tags":["Fetch Sitewide Analytics"],"description":"Returns sitewide KPI time-series data with configurable granularity and optional audience segmentation.\n\n### Parameters\n\n- `granularity` — optional time bucketing: `day`, `week` (default), or `month`\n- `feature` — optional feature selector object:\n  - `{ \"name\": \"performance\" }` for the core KPI subset in an `\"All\"` segment\n  - omit `feature` entirely for the full sitewide metric set in an `\"All\"` segment\n  - `{ \"name\": \"audience\", \"audience\": \"device_type\" }` for per-segment audience timeseries\n  - `{ \"name\": \"order\" }` for order-focused timeseries\n  - `{ \"name\": \"conversion\" }` for conversion funnel timeseries\n\n### `dt` Field Format\n\n`dt` is returned as a formatted date string (not Unix epoch). Format is `\"YYYY-MM-DDTHH:mm:ss\"` for all granularities (`day`, `week`, and `month`).\n\n### Response Notes\n\n- Each data point contains `dt` plus one or more numeric KPI fields (for example: `n_visitors`, `conversion_rate`, `n_orders`, `aov`, `net_revenue`, `gross_profit`).\n- Each segment can include a `summary` object with aggregate totals in addition to the `data` array.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"start":{"description":"Start of analysis period as an ISO 8601 datetime string (e.g. '2025-01-01T00:00:00.000-05:00'). Defaults to 30 days ago.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"end":{"description":"End of analysis period as an ISO 8601 datetime string. Defaults to now.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"feature":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","const":"performance"}},"required":["name"]},{"type":"object","properties":{"name":{"type":"string","const":"audience"},"audience":{"type":"string","enum":["device_type","visitor_type","source_channel","source_site","country_code","landing_page_full_path"],"description":"Optional audience breakdown dimension. When provided, returns per-segment snapshot instead of site-level KPIs. Supported values: device_type, visitor_type, source_channel, source_site, country_code, landing_page_full_path."}},"required":["name","audience"]},{"type":"object","properties":{"name":{"type":"string","const":"order"}},"required":["name"]},{"type":"object","properties":{"name":{"type":"string","const":"conversion"}},"required":["name"]}],"type":"object"},"granularity":{"default":"week","description":"Time bucket granularity. Supported values: day, week, month. Defaults to week.","type":"string","enum":["day","week","month"]},"filters":{"description":"Optional analytics filters object. See the Filters Reference for available filter fields.","type":"object","properties":{"deviceType":{"description":"Filter by device type. Options: 'any' (disables filter), 'mobile', 'desktop'. Omit or null to include all devices.","anyOf":[{"type":"string","enum":["any","mobile","desktop"]},{"type":"null"}]},"visitorType":{"description":"Filter by visitor type. Options: 'any' (disables filter), 'new', 'returning'. Omit or null to include all visitors.","anyOf":[{"type":"string","enum":["any","new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. Array of channel names: 'Referral', 'All Social', 'Organic Social', 'Paid Social', 'Organic Search', 'Paid Search', 'Paid Shopping', 'Email', 'Google', 'Facebook', 'Instagram', 'Linktree', 'TikTok', 'Twitter', 'Direct', 'SMS', 'Meta', 'Link Tree', 'Wunderkind Text', 'Youtube', 'Other', 'any'. Omit or pass empty array for all channels.","type":"array","items":{"type":"string","enum":["Referral","All Social","Organic Social","Paid Social","Organic Search","Paid Search","Paid Shopping","Email","Google","Facebook","Instagram","Linktree","TikTok","Twitter","Direct","SMS","Other","Meta","Link Tree","Wunderkind Text","Youtube","Affiliate","any"]}},"landingPage":{"description":"DEPRECATED — use landingPageFilters instead, which supports multiple values and an and/or operator. This single-path filter is retained for backwards compatibility and still works, but new integrations should use landingPageFilters. Filter by landing page URL path. Object with: landingPageUrlPath (string|null — the path to match), landingPageUrlPathFilterType (match operator|null: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull'). For 'isNull'/'isNotNull' operators, set landingPageUrlPath to null. Note: 'regex' is NOT supported here (unlike urlParam).","deprecated":true,"anyOf":[{"type":"object","properties":{"landingPageUrlPath":{"anyOf":[{"type":"string"},{"type":"null"}]},"landingPageUrlPathFilterType":{"anyOf":[{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]},{"type":"null"}]}},"required":["landingPageUrlPath","landingPageUrlPathFilterType"]},{"type":"null"}]},"landingPageFilters":{"description":"Filter by landing page URL path with multi-value support. Recommended landing page filter (supersedes the deprecated landingPage field). Array of filter items, each with: filterType (match operator: 'equals', 'contains', 'startsWith', 'endsWith', 'doesNotEqual', 'doesNotContain', 'doesNotStartWith', 'doesNotEndWith', 'isNull', 'isNotNull') and values (array of strings to match against — omit for 'isNull'/'isNotNull'). Multiple values within a single item are OR'd. How items in the array are combined is controlled by landingPageFiltersOperator.","type":"array","items":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"filterType":{"type":"string","enum":["equals","contains","startsWith","endsWith","doesNotEqual","doesNotContain","doesNotStartWith","doesNotEndWith","isNull","isNotNull"]}},"required":["filterType"]}},"landingPageFiltersOperator":{"description":"How multiple items in landingPageFilters are combined. 'or' (default) — session matches if any filter item matches. 'and' — session must match every filter item.","type":"string","enum":["or","and"]},"countryCodes":{"description":"Filter by ISO 3166-1 alpha-2 country codes (e.g. ['US', 'GB', 'CA']). Omit or pass empty array for all countries.","type":"array","items":{"type":"string"}},"countryCodesFilterType":{"description":"How countryCodes should be matched: 'include' (only visitors in the listed countries) or 'exclude' (visitors in any country except the listed ones). Defaults to 'include' when omitted. Requires countryCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"currencyCodes":{"description":"Filter by ISO 4217 order currency codes (e.g. ['USD', 'GBP', 'CAD']). Matches the currency an order was placed in. Omit or pass empty array for all currencies.","type":"array","items":{"type":"string"}},"currencyCodesFilterType":{"description":"How currencyCodes should be matched: 'include' (only orders in the listed currencies) or 'exclude' (orders in any currency except the listed ones). Defaults to 'include' when omitted. Requires currencyCodes to be a non-empty array.","type":"string","enum":["include","exclude"]},"maxZScore":{"description":"Maximum Z-score threshold for outlier filtering on order revenue. Visitors with orders whose Z-score exceeds this value are excluded. Accepts number or numeric string. Null or omit to disable outlier filtering.","anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"onlyProductIds":{"description":"Filter to orders containing at least one of these Shopify product IDs (numeric strings, e.g. ['1234567890', '9876543210']). Omit or pass an empty array for all products.","type":"array","items":{"type":"string"}},"landingPageTypes":{"description":"Filter sessions by landing page types. An array of values from: 'PDP', 'Collection', 'Content', 'Blog', 'Homepage', 'Search', 'Cart', 'Other'. Omit or null to include all landing page types.","type":"array","items":{"type":"string","enum":["PDP","Collection","Content","Blog","Homepage","Search","Cart","Other"]}},"allOrders":{"description":"Whether to include all orders or only matched orders.","type":"boolean"}}}}}}}},"responses":{"200":{"description":"OK","headers":{"access-control-allow-origin":{"schema":{"type":"string"},"description":"CORS allow-origin header."},"access-control-allow-credentials":{"schema":{"type":"string"},"description":"CORS allow-credentials header."},"content-type":{"schema":{"type":"string"},"description":"Response content type."},"Timing-Allow-Origin":{"schema":{"type":"string"},"description":"Allowed origin for Timing headers."}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 currency code for monetary values (e.g. 'USD')."},"granularity":{"type":"string","enum":["day","week","month"],"description":"The granularity used for time bucketing."},"segments":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"dt":{"type":"string"}},"required":["dt"],"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"summary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"required":["data"],"additionalProperties":false},"description":"Time series data keyed by segment name. Contains 'All' for performance/order requests, or per-segment keys when `feature.name` is `audience`."}},"required":["currency","granularity","segments"],"additionalProperties":false}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.intelligems.io/developer-resources/external-api/fetch-sitewide-analytics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
