> 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-dev/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 \`entryPoint\` 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.                                                       |\
> \| \`entryPoint\`       | 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"\`. Renamed from \`audience\` (see note below). See "Entry point 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.\
> \
> \### Entry point vs. filters\
> \
> \`entryPoint\` 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. \`entryPoint\` changes \_which buckets are shown\_ at step 1. They don't filter the same way — in fact, \`entryPoint\` 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.\
> \- \*\*\`entryPoint: "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?" | \`entryPoint: "device\_type"\`                         |\
> \| "How does the funnel split by channel, restricted to mobile US traffic?"                | both: \`entryPoint: "source\_channel"\` + \`filters: …\` |\
> \
> They compose without conflict — \`entryPoint\` controls the rendering of step 1, \`filters\` controls what data feeds into the funnel in the first place.\
> \
> \#### Supported \`entryPoint\` values\
> \
> \| \`entryPoint\` value | Step-1 nodes                                                                                                                                     |\
> \| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |\
> \| \`"device\_type"\`    | \`"Mobile"\`, \`"Desktop"\`                                                                                                                          |\
> \| \`"visitor\_type"\`   | \`"New"\`, \`"Returning"\`                                                                                                                           |\
> \| \`"source\_channel"\` | Channel buckets: \`"Paid Social"\`, \`"Paid Search"\`, \`"Direct"\`, \`"Organic Search"\`, \`"Email"\`, \`"Affiliate"\`, … with top-5 + \`"Other"\` rollup     |\
> \| \`"source\_site"\`    | Referrer \*\*display names\*\* (\`"Google"\`, \`"Facebook"\`, \`"Instagram"\`, \`"Klaviyo"\`, \`"TikTok"\`, …) — not hostnames — with top-5 + \`"Other"\` rollup |\
> \
> \##### Reserved step-1 node names\
> \
> \- \*\*\`"Unknown"\`\*\* — emitted for any \`entryPoint\` when the session has no value for that dimension. It is a real bucket and counts toward the top-5 selection.\
> \- \*\*\`"Misc"\`\*\* — emitted only for \`source\_site\` and \`source\_channel\`. Those two dimensions get the top-5 rollup, which reserves \`"Other"\` as the catch-all, so a session whose own taxonomy value is literally \`Other\` is renamed to \`"Misc"\` to keep the two distinct. \`device\_type\` and \`visitor\_type\` have no rollup and therefore never produce \`"Misc"\`.\
> \- \*\*\`"Other"\`\*\* — the top-5 rollup catch-all on \`source\_site\` and \`source\_channel\` only. Not a value any session carries.\
> \
> 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 \`entryPoint\` 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 \`entryPoint\` is omitted entirely, the funnel uses its built-in default step-1 split (the same default the dashboard's Customer Journey chart starts on).\
> \
> \#### Renamed from \`audience\`\
> \
> This parameter was named \`audience\` in earlier \`v25-10-beta\` builds. It was renamed to \`entryPoint\` to disambiguate it from the \`audience\` segmentation parameter on the \`/analytics/sitewide/snapshot\` and \`/analytics/sitewide/timeseries\` endpoints — on the funnel it pivots step-1 entry-point nodes, it does not segment KPIs. A legacy \`audience\` key sent to this endpoint is now \*\*ignored\*\* (the funnel falls back to its default step-1 split rather than erroring), so update existing integrations to send \`entryPoint\`.\
> \
> \### 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 (dev)","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Dev"}],"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 `entryPoint` 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| `entryPoint`       | 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\"`. Renamed from `audience` (see note below). See \"Entry point 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### Entry point vs. filters\n\n`entryPoint` 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. `entryPoint` changes _which buckets are shown_ at step 1. They don't filter the same way — in fact, `entryPoint` 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- **`entryPoint: \"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?\" | `entryPoint: \"device_type\"`                         |\n| \"How does the funnel split by channel, restricted to mobile US traffic?\"                | both: `entryPoint: \"source_channel\"` + `filters: …` |\n\nThey compose without conflict — `entryPoint` controls the rendering of step 1, `filters` controls what data feeds into the funnel in the first place.\n\n#### Supported `entryPoint` values\n\n| `entryPoint` 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 Search\"`, `\"Email\"`, `\"Affiliate\"`, … with top-5 + `\"Other\"` rollup     |\n| `\"source_site\"`    | Referrer **display names** (`\"Google\"`, `\"Facebook\"`, `\"Instagram\"`, `\"Klaviyo\"`, `\"TikTok\"`, …) — not hostnames — with top-5 + `\"Other\"` rollup |\n\n##### Reserved step-1 node names\n\n- **`\"Unknown\"`** — emitted for any `entryPoint` when the session has no value for that dimension. It is a real bucket and counts toward the top-5 selection.\n- **`\"Misc\"`** — emitted only for `source_site` and `source_channel`. Those two dimensions get the top-5 rollup, which reserves `\"Other\"` as the catch-all, so a session whose own taxonomy value is literally `Other` is renamed to `\"Misc\"` to keep the two distinct. `device_type` and `visitor_type` have no rollup and therefore never produce `\"Misc\"`.\n- **`\"Other\"`** — the top-5 rollup catch-all on `source_site` and `source_channel` only. Not a value any session carries.\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 `entryPoint` 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 `entryPoint` 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#### Renamed from `audience`\n\nThis parameter was named `audience` in earlier `v25-10-beta` builds. It was renamed to `entryPoint` to disambiguate it from the `audience` segmentation parameter on the `/analytics/sitewide/snapshot` and `/analytics/sitewide/timeseries` endpoints — on the funnel it pivots step-1 entry-point nodes, it does not segment KPIs. A legacy `audience` key sent to this endpoint is now **ignored** (the funnel falls back to its default step-1 split rather than erroring), so update existing integrations to send `entryPoint`.\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 the start of the day 30 days ago, in the store's timezone. Note the default differs per sitewide endpoint, so pass an explicit start if you need a specific window.","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 `entryPoint`, 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"}]},"customerType":{"description":"Filter by customer type. Options: 'new', 'returning'. Omit or null to include all customers.","anyOf":[{"type":"string","enum":["new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. These 25 values are the complete accepted set — the channels the analytics service buckets sessions and orders into — and any other value is rejected with a 400: 'Instagram', 'Facebook', 'Google', 'Twitter', 'TikTok', 'Youtube', 'Klaviyo', 'Attentive', 'Postscript', 'Paid Shopping', 'Paid Search', 'Paid Social', 'Paid Video', 'Display', 'Paid Other', 'Organic Shopping', 'Organic Social', 'Organic Video', 'Organic Search', 'Other', 'Referral', 'Affiliate', 'SMS', 'Email', 'Direct'. Omit or pass an empty array for all channels — there is no 'any' sentinel.","type":"array","items":{"type":"string","enum":["Instagram","Facebook","Google","Twitter","TikTok","Youtube","Klaviyo","Attentive","Postscript","Paid Shopping","Paid Search","Paid Social","Paid Video","Display","Paid Other","Organic Shopping","Organic Social","Organic Video","Organic Search","Other","Referral","Affiliate","SMS","Email","Direct"]}},"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'). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires a non-empty landingPageUrlPath; 'isNull'/'isNotNull' take no path, so leave landingPageUrlPath null; and a landingPageUrlPath with no landingPageUrlPathFilterType is rejected. Omit both fields to apply no landing-page filter.","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). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires at least one non-empty entry in values — an omitted, empty, or blank-only values array is rejected rather than silently matching nothing. 'isNull'/'isNotNull' take no values; omit the field (an empty array is tolerated, real values are rejected). 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"]}}}},"entryPoint":{"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. NOTE: this parameter was named `audience` in earlier v25-10-beta builds (renamed to disambiguate it from the `audience` segmentation param on the snapshot/timeseries endpoints). A legacy `audience` key sent to this endpoint is now ignored — update integrations to `entryPoint`.","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 (dev)","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Dev"}],"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 the start of the week containing the date 12 weeks ago, in the store's timezone (weeks start Monday), so the default start is week-aligned rather than exactly 84 days back. Note the default differs per sitewide endpoint, so pass an explicit start if you need a specific window.","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"}]},"customerType":{"description":"Filter by customer type. Options: 'new', 'returning'. Omit or null to include all customers.","anyOf":[{"type":"string","enum":["new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. These 25 values are the complete accepted set — the channels the analytics service buckets sessions and orders into — and any other value is rejected with a 400: 'Instagram', 'Facebook', 'Google', 'Twitter', 'TikTok', 'Youtube', 'Klaviyo', 'Attentive', 'Postscript', 'Paid Shopping', 'Paid Search', 'Paid Social', 'Paid Video', 'Display', 'Paid Other', 'Organic Shopping', 'Organic Social', 'Organic Video', 'Organic Search', 'Other', 'Referral', 'Affiliate', 'SMS', 'Email', 'Direct'. Omit or pass an empty array for all channels — there is no 'any' sentinel.","type":"array","items":{"type":"string","enum":["Instagram","Facebook","Google","Twitter","TikTok","Youtube","Klaviyo","Attentive","Postscript","Paid Shopping","Paid Search","Paid Social","Paid Video","Display","Paid Other","Organic Shopping","Organic Social","Organic Video","Organic Search","Other","Referral","Affiliate","SMS","Email","Direct"]}},"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'). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires a non-empty landingPageUrlPath; 'isNull'/'isNotNull' take no path, so leave landingPageUrlPath null; and a landingPageUrlPath with no landingPageUrlPathFilterType is rejected. Omit both fields to apply no landing-page filter.","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). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires at least one non-empty entry in values — an omitted, empty, or blank-only values array is rejected rather than silently matching nothing. 'isNull'/'isNotNull' take no values; omit the field (an empty array is tolerated, real values are rejected). 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. It selects which metric set is returned.\
> \
> \*\*These sets belong to this endpoint.\*\* They are not the same as the sets on \`POST /analytics/sitewide/timeseries\` — the two endpoints compute different metrics, so a set with the same name returns different fields on each.\
> \
> \| \`feature\`                                           | Fields returned                                                                                                                                                                                           |\
> \| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\
> \| \`{ "name": "performance" }\`                         | \`gross\_profit\_per\_visitor\`, \`net\_revenue\_per\_visitor\`, \`conversion\_rate\`, \`aov\`, \`gross\_margin\_pct\`, \`gross\_profit\`, \`net\_revenue\`, \`n\_orders\`, \`n\_visitors\`, \`average\_discount\`, \`pct\_revenue\_with\_cogs\` |\
> \| \`{ "name": "order" }\`                               | \`aov\`, \`n\_visitors\`, \`n\_orders\`, \`median\_order\_value\`, \`average\_units\_per\_order\`, \`pct\_orders\_with\_free\_shipping\`, \`net\_shipping\_revenue\_per\_order\`                                                       |\
> \| \`{ "name": "conversion" }\`                          | \`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\`                  |\
> \| \`{ "name": "audience", "audience": "device\_type" }\` | The full sitewide metric set, broken out per segment                                                                                                                                                      |\
> \
> Omitting \`feature\` entirely returns the full sitewide metric set in a single \`"All"\` segment.\
> \
> \`median\_order\_value\` and \`average\_discount\` are available only on this endpoint. Conversely, the timeseries endpoint returns per-session rates (\`sessions\_per\_visitor\`, \`conversion\_rate\_per\_session\`, \`net\_revenue\_per\_session\`, \`gross\_profit\_per\_session\`) and \`cost\_of\_revenue\`, none of which are computed here.\
> \
> \### 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 }, ... }\
> }\
> \`\`\`\
> \
> \*\*A window with no data returns an empty object \`{}\`\*\* — not \`{ "All": {} }\` and not a segment map with zeroed metrics. This applies to every feature, including \`audience\` (no \`"\_\_total"\` key either). Check that the segment you want is present before reading metrics off it; \`response.All.n\_visitors.value\` will throw on an empty window.\
> \
> 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).\
> \
> \*\*\`impact\_from\_visitor\_mix\_shift\` appears on \`\_\_total\` for ratio metrics only\*\* — within the \`audience\` field set that means \`conversion\_rate\`, \`aov\`, \`net\_revenue\_per\_visitor\`, and \`pct\_revenue\_with\_cogs\`. (\`gross\_margin\_pct\` is a ratio but is not part of the \`audience\` field set, so it never carries this field.) Additive metrics (\`n\_visitors\`, \`n\_orders\`, \`net\_revenue\`, \`gross\_profit\`, and the rest of the counts and totals) never carry it, so expect it on a minority of the fields in a \`\_\_total\` object rather than on all of them. It is the residual of the total percent change that is not attributable to any individual segment — the part explained by the mix of visitors shifting between segments — which is only meaningful for a weighted average, not for a sum.\
> \
> 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 are returned as a bare \`null\` (not a \`{ value, pct\_change }\` object) when \`cogs\_configured\` is \`false\`. On this endpoint that is \*\*four\*\* fields:\
> \
> \- \`gross\_profit\`\
> \- \`gross\_profit\_per\_visitor\`\
> \- \`gross\_margin\_pct\`\
> \- \`oli\_net\_product\_revenue\_with\_cogs\`\
> \
> Clients must null-check all four before reading \`.value\` / \`.pct\_change\`. The suppression is applied to any profit metric, so the same rule holds for other profit fields (for example \`gross\_profit\_per\_order\`, \`product\_profit\`, \`subscription\_gross\_profit\`) on the endpoints that return them.\
> \
> \### 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 (dev)","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Dev"}],"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. It selects which metric set is returned.\n\n**These sets belong to this endpoint.** They are not the same as the sets on `POST /analytics/sitewide/timeseries` — the two endpoints compute different metrics, so a set with the same name returns different fields on each.\n\n| `feature`                                           | Fields returned                                                                                                                                                                                           |\n| --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `{ \"name\": \"performance\" }`                         | `gross_profit_per_visitor`, `net_revenue_per_visitor`, `conversion_rate`, `aov`, `gross_margin_pct`, `gross_profit`, `net_revenue`, `n_orders`, `n_visitors`, `average_discount`, `pct_revenue_with_cogs` |\n| `{ \"name\": \"order\" }`                               | `aov`, `n_visitors`, `n_orders`, `median_order_value`, `average_units_per_order`, `pct_orders_with_free_shipping`, `net_shipping_revenue_per_order`                                                       |\n| `{ \"name\": \"conversion\" }`                          | `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| `{ \"name\": \"audience\", \"audience\": \"device_type\" }` | The full sitewide metric set, broken out per segment                                                                                                                                                      |\n\nOmitting `feature` entirely returns the full sitewide metric set in a single `\"All\"` segment.\n\n`median_order_value` and `average_discount` are available only on this endpoint. Conversely, the timeseries endpoint returns per-session rates (`sessions_per_visitor`, `conversion_rate_per_session`, `net_revenue_per_session`, `gross_profit_per_session`) and `cost_of_revenue`, none of which are computed here.\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\n**A window with no data returns an empty object `{}`** — not `{ \"All\": {} }` and not a segment map with zeroed metrics. This applies to every feature, including `audience` (no `\"__total\"` key either). Check that the segment you want is present before reading metrics off it; `response.All.n_visitors.value` will throw on an empty window.\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).\n\n**`impact_from_visitor_mix_shift` appears on `__total` for ratio metrics only** — within the `audience` field set that means `conversion_rate`, `aov`, `net_revenue_per_visitor`, and `pct_revenue_with_cogs`. (`gross_margin_pct` is a ratio but is not part of the `audience` field set, so it never carries this field.) Additive metrics (`n_visitors`, `n_orders`, `net_revenue`, `gross_profit`, and the rest of the counts and totals) never carry it, so expect it on a minority of the fields in a `__total` object rather than on all of them. It is the residual of the total percent change that is not attributable to any individual segment — the part explained by the mix of visitors shifting between segments — which is only meaningful for a weighted average, not for a sum.\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 are returned as a bare `null` (not a `{ value, pct_change }` object) when `cogs_configured` is `false`. On this endpoint that is **four** fields:\n\n- `gross_profit`\n- `gross_profit_per_visitor`\n- `gross_margin_pct`\n- `oli_net_product_revenue_with_cogs`\n\nClients must null-check all four before reading `.value` / `.pct_change`. The suppression is applied to any profit metric, so the same rule holds for other profit fields (for example `gross_profit_per_order`, `product_profit`, `subscription_gross_profit`) on the endpoints that return them.\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 the start of the week containing the date one week ago, in the store's timezone (weeks start Monday) — so the default window spans 7 to 13 days depending on the current weekday, not exactly 7. Note the default differs per sitewide endpoint, so pass an explicit start if you need a specific window.","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"}]},"customerType":{"description":"Filter by customer type. Options: 'new', 'returning'. Omit or null to include all customers.","anyOf":[{"type":"string","enum":["new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. These 25 values are the complete accepted set — the channels the analytics service buckets sessions and orders into — and any other value is rejected with a 400: 'Instagram', 'Facebook', 'Google', 'Twitter', 'TikTok', 'Youtube', 'Klaviyo', 'Attentive', 'Postscript', 'Paid Shopping', 'Paid Search', 'Paid Social', 'Paid Video', 'Display', 'Paid Other', 'Organic Shopping', 'Organic Social', 'Organic Video', 'Organic Search', 'Other', 'Referral', 'Affiliate', 'SMS', 'Email', 'Direct'. Omit or pass an empty array for all channels — there is no 'any' sentinel.","type":"array","items":{"type":"string","enum":["Instagram","Facebook","Google","Twitter","TikTok","Youtube","Klaviyo","Attentive","Postscript","Paid Shopping","Paid Search","Paid Social","Paid Video","Display","Paid Other","Organic Shopping","Organic Social","Organic Video","Organic Search","Other","Referral","Affiliate","SMS","Email","Direct"]}},"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'). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires a non-empty landingPageUrlPath; 'isNull'/'isNotNull' take no path, so leave landingPageUrlPath null; and a landingPageUrlPath with no landingPageUrlPathFilterType is rejected. Omit both fields to apply no landing-page filter.","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). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires at least one non-empty entry in values — an omitted, empty, or blank-only values array is rejected rather than silently matching nothing. 'isNull'/'isNotNull' take no values; omit the field (an empty array is tolerated, real values are rejected). 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, a choice of metric set, and optional audience segmentation.\
> \
> \### Parameters\
> \
> \- \`granularity\` — optional time bucketing: \`day\`, \`week\` (default), or \`month\`\
> \- \`feature\` — optional metric-set selector object. \*\*These sets belong to this endpoint.\*\* They are not the same as the sets on \`POST /analytics/sitewide/snapshot\` — the two endpoints compute different metrics, so a set with the same name returns different fields on each. See "Metric sets" below.\
> \
> \### Metric sets\
> \
> Omit \`feature\` to receive every metric this endpoint produces. Pass one of the following to receive only that set:\
> \
> \| \`feature\`                                           | Segment keys        | Fields returned (in addition to \`dt\`)                                                                                                                                                                                                                                                                                                                                           |\
> \| --------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\
> \| \`{ "name": "performance" }\`                         | \`"All"\`             | \`n\_visitors\`, \`n\_orders\`, \`conversion\_rate\`, \`aov\`, \`net\_revenue\`, \`net\_revenue\_per\_visitor\`, \`gross\_profit\`, \`gross\_profit\_per\_visitor\`, \`gross\_margin\_pct\`, \`pct\_revenue\_with\_cogs\`                                                                                                                                                                                           |\
> \| \`{ "name": "order" }\`                               | \`"All"\`             | \`n\_orders\`, \`aov\`, \`aov\_pre\_discount\`, \`units\_per\_order\`, \`net\_revenue\_per\_unit\`, \`gross\_revenue\_per\_unit\`, \`discount\_per\_unit\`, \`pct\_orders\_with\_free\_shipping\`, \`net\_shipping\_revenue\_per\_order\`                                                                                                                                                                              |\
> \| \`{ "name": "conversion" }\`                          | \`"All"\`             | Funnel step rates — \`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\` — plus the four counts those rates are derived from: \`n\_sessions\`, \`n\_visitors\`, \`n\_visitors\_abandoned\_cart\`, \`n\_visitors\_abandoned\_checkout\` (12 fields in total) |\
> \| \`{ "name": "audience", "audience": "device\_type" }\` | one key per segment | The full per-segment metric set for the chosen dimension                                                                                                                                                                                                                                                                                                                        |\
> \
> The endpoint produces 37 metrics in total; \`performance\` and \`order\` between them cover 17. The remaining 20 are returned \*\*only\*\* when \`feature\` is omitted:\
> \
> \`n\_sessions\`, \`sessions\_per\_visitor\`, \`conversion\_rate\_per\_session\`, \`net\_revenue\_per\_session\`, \`gross\_profit\_per\_session\`, \`gross\_revenue\`, \`net\_product\_revenue\`, \`net\_shipping\_revenue\`, \`order\_cogs\`, \`oli\_net\_product\_revenue\`, \`oli\_net\_product\_revenue\_with\_cogs\`, \`unit\_quantity\`, \`lost\_orders\`, \`lost\_net\_revenue\`, \`n\_free\_shipping\_orders\`, \`discounts\`, \`shipping\_cost\`, \`transaction\_fees\`, \`tax\`, \`cost\_of\_revenue\`\
> \
> Several of those — the per-session rates and \`cost\_of\_revenue\` — cannot be produced by the snapshot endpoint at all. Conversely, \`median\_order\_value\` and \`average\_discount\` are available only on the snapshot endpoint and are never returned here.\
> \
> \`conversion\` and \`audience\` are served by dedicated datasets, so their field sets are fixed by those datasets rather than filtered from the general metric set.\
> \
> \### \`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 the numeric fields for the selected metric set.\
> \- Fields are \`null\` rather than \`0\` when a bucket has no data to compute them from (for example \`conversion\_rate\` in a bucket with no visitors).\
> \- \`summary\` carries one fewer field than \`data\`: \`sessions\_per\_visitor\` appears on each data point but is not summarized. Do not assume the two key sets match.\
> \
> \### \`summary\` is not a window total\
> \
> Each segment can include a \`summary\` object alongside \`data\`, but \*\*it is not the sum over the requested window\*\*, and the two kinds of metric behave differently:\
> \
> \- \*\*Additive metrics\*\* — \`n\_sessions\`, \`n\_orders\`, \`gross\_revenue\`, \`net\_product\_revenue\`, \`net\_shipping\_revenue\`, \`n\_free\_shipping\_orders\`, \`net\_revenue\`, \`order\_cogs\`, \`oli\_net\_product\_revenue\_with\_cogs\`, \`oli\_net\_product\_revenue\`, \`unit\_quantity\`, \`lost\_orders\`, \`lost\_net\_revenue\`, \`discounts\`, \`shipping\_cost\`, \`transaction\_fees\`, \`tax\`, \`cost\_of\_revenue\`, \`gross\_profit\` — are the window sum \*\*rescaled to one \`granularity\` bucket\*\*, i.e. an average per bucket. The same window therefore returns different values at \`day\`, \`week\`, and \`month\`, and counts come back \*\*fractional\*\*. Summing the \`data\` array recovers the true window total for these.\
> \- \*\*Ratio metrics\*\* — \`conversion\_rate\`, \`conversion\_rate\_per\_session\`, \`aov\`, \`aov\_pre\_discount\`, \`net\_revenue\_per\_visitor\`, \`net\_revenue\_per\_session\`, \`gross\_profit\_per\_visitor\`, \`gross\_profit\_per\_session\`, \`units\_per\_order\`, \`gross\_revenue\_per\_unit\`, \`net\_revenue\_per\_unit\`, \`discount\_per\_unit\`, \`gross\_margin\_pct\`, \`pct\_orders\_with\_free\_shipping\`, \`net\_shipping\_revenue\_per\_order\`, \`pct\_revenue\_with\_cogs\` — are computed from the window sums rather than from the rescaled per-bucket values. Ratios whose denominator is not visitor-based (\`aov\`, \`gross\_margin\_pct\`, \`pct\_revenue\_with\_cogs\`, …) are exact window-wide figures and do not vary with \`granularity\`. \*\*Visitor-denominated ratios currently do vary — see the warning below.\*\*\
> \- \*\*\`n\_visitors\` is not additive.\*\* It is a distinct-visitor count, so a visitor active on several days is counted once per bucket they appear in. Summing \`data\[].n\_visitors\` \*\*overcounts\*\*, and the overcount grows as buckets get smaller. \`summary.n\_visitors\` is rescaled like the additive metrics, so it is not a window total either. For a true unique-visitor count over a window, use \`POST /analytics/sitewide/snapshot\`.\
> \
> \*\*To get a window total for an additive metric, sum the \`data\` array yourself. This does not work for \`n\_visitors\`.\*\*\
> \
> Example — one request window (2026-06-01 → 2026-06-29) whose true totals are \`727\` orders and \`138,938\` unique visitors:\
> \
> \| \`granularity\` | \`summary.n\_orders\` | \`sum(data\[].n\_orders)\` | \`sum(data\[].n\_visitors)\` | \`summary.conversion\_rate\` |\
> \| ------------- | ------------------ | ---------------------- | ------------------------ | ------------------------- |\
> \| \`day\`         | \`25.96\`            | \`727\`                  | \`158,528\` (+14.1%)       | \`0.0045859\`               |\
> \| \`week\`        | \`181.75\`           | \`727\`                  | \`146,665\` (+5.6%)        | \`0.0049569\`               |\
> \| \`month\`       | \`791.91\`           | \`727\`                  | \`138,938\` (exact)        | \`0.0052325\`               |\
> \
> The additive scale factor is \`bucket\_days / window\_days\` (\`1\`, \`7\`, and \`30.5\` respectively), which is why \`month\` on a 28-day window exceeds the true total.\
> \
> \> \*\*Known issue — visitor-denominated summary ratios vary with \`granularity\`.\*\* \`summary.conversion\_rate\`, \`summary.net\_revenue\_per\_visitor\`, and \`summary.gross\_profit\_per\_visitor\` are computed as \`numerator / sum(data\[].n\_visitors)\`. Because that denominator double-counts returning visitors, these three are understated at \`day\` and \`week\` granularity and only correct when the window fits in a single bucket. In the example above the true conversion rate is \`0.0052325\` (confirmed against \`/analytics/sitewide/snapshot\` for the same window), but \`day\` reports \`0.0045859\` — a 12.3% understatement. Until this is fixed, read these three from \`POST /analytics/sitewide/snapshot\`, or compute them yourself from \`sum(data\[].n\_orders)\` and the snapshot's \`n\_visitors\`. Ratios with non-visitor denominators are unaffected.

```json
{"openapi":"3.1.0","info":{"title":"Intelligems External API v25-10-beta (dev)","version":"v25-10-beta"},"tags":[{"name":"Fetch Sitewide Analytics"}],"servers":[{"url":"https://api.intelligems.io","description":"Dev"}],"paths":{"/v25-10-beta/analytics/sitewide/timeseries":{"post":{"tags":["Fetch Sitewide Analytics"],"description":"Returns sitewide KPI time-series data with configurable granularity, a choice of metric set, and optional audience segmentation.\n\n### Parameters\n\n- `granularity` — optional time bucketing: `day`, `week` (default), or `month`\n- `feature` — optional metric-set selector object. **These sets belong to this endpoint.** They are not the same as the sets on `POST /analytics/sitewide/snapshot` — the two endpoints compute different metrics, so a set with the same name returns different fields on each. See \"Metric sets\" below.\n\n### Metric sets\n\nOmit `feature` to receive every metric this endpoint produces. Pass one of the following to receive only that set:\n\n| `feature`                                           | Segment keys        | Fields returned (in addition to `dt`)                                                                                                                                                                                                                                                                                                                                           |\n| --------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `{ \"name\": \"performance\" }`                         | `\"All\"`             | `n_visitors`, `n_orders`, `conversion_rate`, `aov`, `net_revenue`, `net_revenue_per_visitor`, `gross_profit`, `gross_profit_per_visitor`, `gross_margin_pct`, `pct_revenue_with_cogs`                                                                                                                                                                                           |\n| `{ \"name\": \"order\" }`                               | `\"All\"`             | `n_orders`, `aov`, `aov_pre_discount`, `units_per_order`, `net_revenue_per_unit`, `gross_revenue_per_unit`, `discount_per_unit`, `pct_orders_with_free_shipping`, `net_shipping_revenue_per_order`                                                                                                                                                                              |\n| `{ \"name\": \"conversion\" }`                          | `\"All\"`             | Funnel step rates — `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` — plus the four counts those rates are derived from: `n_sessions`, `n_visitors`, `n_visitors_abandoned_cart`, `n_visitors_abandoned_checkout` (12 fields in total) |\n| `{ \"name\": \"audience\", \"audience\": \"device_type\" }` | one key per segment | The full per-segment metric set for the chosen dimension                                                                                                                                                                                                                                                                                                                        |\n\nThe endpoint produces 37 metrics in total; `performance` and `order` between them cover 17. The remaining 20 are returned **only** when `feature` is omitted:\n\n`n_sessions`, `sessions_per_visitor`, `conversion_rate_per_session`, `net_revenue_per_session`, `gross_profit_per_session`, `gross_revenue`, `net_product_revenue`, `net_shipping_revenue`, `order_cogs`, `oli_net_product_revenue`, `oli_net_product_revenue_with_cogs`, `unit_quantity`, `lost_orders`, `lost_net_revenue`, `n_free_shipping_orders`, `discounts`, `shipping_cost`, `transaction_fees`, `tax`, `cost_of_revenue`\n\nSeveral of those — the per-session rates and `cost_of_revenue` — cannot be produced by the snapshot endpoint at all. Conversely, `median_order_value` and `average_discount` are available only on the snapshot endpoint and are never returned here.\n\n`conversion` and `audience` are served by dedicated datasets, so their field sets are fixed by those datasets rather than filtered from the general metric set.\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 the numeric fields for the selected metric set.\n- Fields are `null` rather than `0` when a bucket has no data to compute them from (for example `conversion_rate` in a bucket with no visitors).\n- `summary` carries one fewer field than `data`: `sessions_per_visitor` appears on each data point but is not summarized. Do not assume the two key sets match.\n\n### `summary` is not a window total\n\nEach segment can include a `summary` object alongside `data`, but **it is not the sum over the requested window**, and the two kinds of metric behave differently:\n\n- **Additive metrics** — `n_sessions`, `n_orders`, `gross_revenue`, `net_product_revenue`, `net_shipping_revenue`, `n_free_shipping_orders`, `net_revenue`, `order_cogs`, `oli_net_product_revenue_with_cogs`, `oli_net_product_revenue`, `unit_quantity`, `lost_orders`, `lost_net_revenue`, `discounts`, `shipping_cost`, `transaction_fees`, `tax`, `cost_of_revenue`, `gross_profit` — are the window sum **rescaled to one `granularity` bucket**, i.e. an average per bucket. The same window therefore returns different values at `day`, `week`, and `month`, and counts come back **fractional**. Summing the `data` array recovers the true window total for these.\n- **Ratio metrics** — `conversion_rate`, `conversion_rate_per_session`, `aov`, `aov_pre_discount`, `net_revenue_per_visitor`, `net_revenue_per_session`, `gross_profit_per_visitor`, `gross_profit_per_session`, `units_per_order`, `gross_revenue_per_unit`, `net_revenue_per_unit`, `discount_per_unit`, `gross_margin_pct`, `pct_orders_with_free_shipping`, `net_shipping_revenue_per_order`, `pct_revenue_with_cogs` — are computed from the window sums rather than from the rescaled per-bucket values. Ratios whose denominator is not visitor-based (`aov`, `gross_margin_pct`, `pct_revenue_with_cogs`, …) are exact window-wide figures and do not vary with `granularity`. **Visitor-denominated ratios currently do vary — see the warning below.**\n- **`n_visitors` is not additive.** It is a distinct-visitor count, so a visitor active on several days is counted once per bucket they appear in. Summing `data[].n_visitors` **overcounts**, and the overcount grows as buckets get smaller. `summary.n_visitors` is rescaled like the additive metrics, so it is not a window total either. For a true unique-visitor count over a window, use `POST /analytics/sitewide/snapshot`.\n\n**To get a window total for an additive metric, sum the `data` array yourself. This does not work for `n_visitors`.**\n\nExample — one request window (2026-06-01 → 2026-06-29) whose true totals are `727` orders and `138,938` unique visitors:\n\n| `granularity` | `summary.n_orders` | `sum(data[].n_orders)` | `sum(data[].n_visitors)` | `summary.conversion_rate` |\n| ------------- | ------------------ | ---------------------- | ------------------------ | ------------------------- |\n| `day`         | `25.96`            | `727`                  | `158,528` (+14.1%)       | `0.0045859`               |\n| `week`        | `181.75`           | `727`                  | `146,665` (+5.6%)        | `0.0049569`               |\n| `month`       | `791.91`           | `727`                  | `138,938` (exact)        | `0.0052325`               |\n\nThe additive scale factor is `bucket_days / window_days` (`1`, `7`, and `30.5` respectively), which is why `month` on a 28-day window exceeds the true total.\n\n> **Known issue — visitor-denominated summary ratios vary with `granularity`.** `summary.conversion_rate`, `summary.net_revenue_per_visitor`, and `summary.gross_profit_per_visitor` are computed as `numerator / sum(data[].n_visitors)`. Because that denominator double-counts returning visitors, these three are understated at `day` and `week` granularity and only correct when the window fits in a single bucket. In the example above the true conversion rate is `0.0052325` (confirmed against `/analytics/sitewide/snapshot` for the same window), but `day` reports `0.0045859` — a 12.3% understatement. Until this is fixed, read these three from `POST /analytics/sitewide/snapshot`, or compute them yourself from `sum(data[].n_orders)` and the snapshot's `n_visitors`. Ratios with non-visitor denominators are unaffected.","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 the start of the week containing the date 12 weeks ago, in the store's timezone (weeks start Monday), so the default start is week-aligned rather than exactly 84 days back. Note the default differs per sitewide endpoint, so pass an explicit start if you need a specific window.","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":{"description":"Optional metric-set selector. Object form, e.g. { \"name\": \"performance\" }. Values: 'performance' (headline KPI trend), 'order' (order composition and per-unit economics), 'conversion' (funnel step rates), or { name: 'audience', audience: '<dimension>' } for a per-segment breakdown. Omit to receive every metric this endpoint produces. NOTE: the fields behind each set are specific to this endpoint and differ from the sitewide snapshot endpoint's set of the same name, because the two run different underlying datasets.","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"}]},"customerType":{"description":"Filter by customer type. Options: 'new', 'returning'. Omit or null to include all customers.","anyOf":[{"type":"string","enum":["new","returning"]},{"type":"null"}]},"sourceSitesOrChannels":{"description":"Filter by traffic source channels. These 25 values are the complete accepted set — the channels the analytics service buckets sessions and orders into — and any other value is rejected with a 400: 'Instagram', 'Facebook', 'Google', 'Twitter', 'TikTok', 'Youtube', 'Klaviyo', 'Attentive', 'Postscript', 'Paid Shopping', 'Paid Search', 'Paid Social', 'Paid Video', 'Display', 'Paid Other', 'Organic Shopping', 'Organic Social', 'Organic Video', 'Organic Search', 'Other', 'Referral', 'Affiliate', 'SMS', 'Email', 'Direct'. Omit or pass an empty array for all channels — there is no 'any' sentinel.","type":"array","items":{"type":"string","enum":["Instagram","Facebook","Google","Twitter","TikTok","Youtube","Klaviyo","Attentive","Postscript","Paid Shopping","Paid Search","Paid Social","Paid Video","Display","Paid Other","Organic Shopping","Organic Social","Organic Video","Organic Search","Other","Referral","Affiliate","SMS","Email","Direct"]}},"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'). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires a non-empty landingPageUrlPath; 'isNull'/'isNotNull' take no path, so leave landingPageUrlPath null; and a landingPageUrlPath with no landingPageUrlPathFilterType is rejected. Omit both fields to apply no landing-page filter.","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). REQUIRED COMBINATIONS (enforced with a 400): every operator except 'isNull'/'isNotNull' requires at least one non-empty entry in values — an omitted, empty, or blank-only values array is rejected rather than silently matching nothing. 'isNull'/'isNotNull' take no values; omit the field (an empty array is tolerated, real values are rejected). 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 every feature except `audience`, which returns per-segment keys. Each segment has a `data` array and an optional `summary`. NOTE: `summary` is not a window total — additive metrics in it are rescaled to a single `granularity` bucket (so counts are fractional and change with granularity), while ratio metrics are computed from the unscaled window sums. Sum the `data` array to get a true window total — except for `n_visitors`, which is a distinct count and cannot be summed across buckets. Known issue: because visitor-denominated ratios divide by that summed visitor count, `conversion_rate`, `net_revenue_per_visitor` and `gross_profit_per_visitor` in `summary` vary with `granularity` and are only exact when the window fits one bucket; read them from `/analytics/sitewide/snapshot` instead."}},"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-dev/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.
