# Analytics and discovery

Site analytics, tracked prompts, AI search readiness and watched questions.

Scopes for this area: `analytics:read`, `analytics:write` and `analytics:admin`.

70 operations.

## site projects

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/projects` | The hosted sites that have analytics, with their hostnames. | read | `rivier analytics site projects list` |

## site overview

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/overview` | Visits, people, sources, pages, countries, devices and browsers for a period, with the change on the period before and the words that describe it. Small groups are merged into Other. | read | `rivier analytics site overview get` |

## site conversions

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/conversions` | Forms, bookings, orders, reviews and chats that happened, by where the visitor came from and by product, room or article. | read | `rivier analytics site conversions get` |

## site goals

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/goals` | Goals: pages reached, events and outcomes, with how often and what they were worth. | read | `rivier analytics site goals get` |

## site cohorts

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/cohorts` | Weekly cohorts of visitors who agreed to recognition and how many came back; small cohorts are left out. | read | `rivier analytics site cohorts get` |

## site funnels

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/funnels` | The enquiry, booking and order steps: how many reached each step. | read | `rivier analytics site funnels get` |

## site ai

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/ai` | Visits that arrived from AI answers, pages AI answer engines fetched, and what those visits led to. | read | `rivier analytics site ai get` |

## site speed

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/speed` | How fast pages feel for real visits, in words, from anonymous samples. | read | `rivier analytics site speed get` |

## site fixes

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/fixes` | Things to fix: broken links, slow pages and regions whose rule waits for a review. | read | `rivier analytics site fixes list` |

## site explain

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/explain` | Why a number changed: ranked causes computed from the counters and from what happened to the site, each with its evidence, and what stays uncertain. | read | `rivier analytics site explain get` |

## site collected

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/collected` | What the site counts and why, region by region, with the rule's status. Guidance, not legal advice. | read | `rivier analytics site collected get` |

## site review

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/review` | Regions the site gets visits from and whether each uses a cautious setting because its rule is unconfirmed, stale or under review. | read | `rivier analytics site review get` |

## site processing

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/processing` | The record-of-processing entry for site analytics. | read | `rivier analytics site processing get` |

## site settings

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/settings` | The analytics settings of a site: mode, signals, thresholds, funnels, data region. | read | `rivier analytics site settings get` |
| PUT | `/analytics/site/settings` | Change the analytics settings of a site. Anything that collects more is a person's decision and an agent is refused. | write | `rivier analytics site settings update` |

## site evidence

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/evidence` | Evidence rows: when the daily secret was destroyed and what each retention run removed. | read | `rivier analytics site evidence list` |

## site share

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/analytics/site/shares` | Read-only links to the numbers that have been shared. | read | `rivier analytics site share list` |
| POST | `/analytics/site/shares` | Make a read-only link to the numbers of a site. The link is shown once. A person's decision. | write | `rivier analytics site share create` |
| POST | `/analytics/site/shares/remove` | Remove a shared link. | write | `rivier analytics site share remove` |

## site import

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/analytics/site/import` | Bring in daily page-view totals from another tool for days before today that have nothing counted here. | write | `rivier analytics site import run` |

## site retention

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/analytics/site/retention/run` | Run the retention schedule now: remove what has outlived it and record the evidence. | write | `rivier analytics site retention run` |

## site transaction

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/analytics/site/transactions` | Record an outcome from the project's own records (a form, booking, order, review or chat) with the source class that travelled with it. Used by the modules that hold those records. | write | `rivier analytics site transaction record` |

## business model

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/business-model` | The maintained model of how the business behaves: what is on record, the weekly series fitted with their expected course and band, when it last changed and when it was last checked. | read | `rivier analytics business model get` |
| POST | `/business-model/refresh` | Bring the business model up to date with the project's records now. | write | `rivier analytics business model refresh` |

## whatif

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/whatif` | Try a decision in simulation before making it: a question and two or three options, run on the same seeds. | write | `rivier analytics whatif start` |
| GET | `/whatif` | The what-if runs of the project, newest first. | read | `rivier analytics whatif list` |
| GET | `/whatif/{id}` | One what-if: each option's share holding at the end with its spread across seeds, and which option is clearly ahead, if any. | read | `rivier analytics whatif get` |
| POST | `/whatif/{id}/decide` | Record which option a person will go with, or none. It does not carry the option out. | write | `rivier analytics whatif decide` |

## predictions

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/predictions/run` | Score current leads or bookings from the project's own history | write | `rivier analytics predictions run` |

## insights

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/predictions/insights` | Prediction insights, highest likelihood first | read | `rivier analytics insights list` |
| POST | `/predictions/insights/{id}/decide` | A person keeps or sets aside an insight | write | `rivier analytics insights decide` |

## analysis

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/workspace/analysis` | How the business is doing. | read | `rivier analytics analysis get` |
| GET | `/workspace/analysis/forecast` | The forecast. | read | `rivier analytics analysis forecast` |

## client

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/workspace/analytics/clients` | Tracked sites and their tags. | read | `rivier analytics client list` |
| POST | `/workspace/analytics/clients` | Track a site. | write | `rivier analytics client create` |
| DELETE | `/workspace/analytics/clients/{clientId}` | Stop tracking a site. | write | `rivier analytics client delete` |

## geo

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| POST | `/geo/audit` | Score a page's readiness for AI search. | write | `rivier analytics geo audit` |
| POST | `/geo/metadata` | Generate metadata for AI discovery. | write | `rivier analytics geo metadata` |
| POST | `/geo/simulate` | Simulate how answer engines would see a page. | write | `rivier analytics geo simulate` |
| POST | `/geo/discovery/submit` | Submit a site for discovery. | write | `rivier analytics geo submit` |
| GET | `/geo/forecast` | Forecast of AI traffic. | read | `rivier analytics geo forecast` |
| GET | `/geo/recommendations` | What to change to be cited more. | read | `rivier analytics geo recommendations` |
| GET | `/geo/geography` | Where AI traffic comes from. | read | `rivier analytics geo geography` |
| GET | `/geo/geography.csv` | The geography as CSV. | read | `rivier analytics geo geography csv` |
| GET | `/geo/answer-loss` | Where answers cite competitors instead. | read | `rivier analytics geo answer loss` |
| GET | `/geo/citation-verification` | Whether cited claims are verified. | read | `rivier analytics geo citations` |
| GET | `/geo/tracker` | Tracked prompts and their standing. | read | `rivier analytics geo tracker` |

## telemetry

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/geo/telemetry` | AI crawler visits to a site. | read | `rivier analytics telemetry get` |
| GET | `/geo/telemetry.csv` | The visits as CSV. | read | `rivier analytics telemetry csv` |

## connector

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/geo/connectors` | Crawler-capture connections. | read | `rivier analytics connector list` |
| POST | `/geo/connectors/cloudflare` | Connect Cloudflare for crawler capture. | write | `rivier analytics connector connect` |
| GET | `/geo/connectors/cloudflare/authorize` | Begin connecting Cloudflare by sign-in. | read | `rivier analytics connector authorize` |
| DELETE | `/geo/connectors/{id}` | Remove a crawler-capture connection. | write | `rivier analytics connector remove` |

## monitor

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/monitor` | Watched questions. | read | `rivier analytics monitor list` |
| POST | `/monitor` | Watch a question and be told when its answer changes. | write | `rivier analytics monitor create` |
| GET | `/monitor/{id}` | One watched question. | read | `rivier analytics monitor get` |
| DELETE | `/monitor/{id}` | Stop watching. | write | `rivier analytics monitor delete` |

## prompt

| Method | Route | What it does | Level | Command |
| --- | --- | --- | --- | --- |
| GET | `/prompt-sets` | Prompt sets tracked across answer engines. | read | `rivier analytics prompt sets` |
| POST | `/prompt-sets` | Create a prompt set. | write | `rivier analytics prompt create set` |
| DELETE | `/prompt-sets/{id}` | Delete a prompt set. | write | `rivier analytics prompt delete set` |
| GET | `/prompt-sets/{id}/prompts` | The prompts of a set. | read | `rivier analytics prompt list` |
| POST | `/prompt-sets/{id}/prompts` | Add a prompt. | write | `rivier analytics prompt add` |
| GET | `/prompt-sets/{id}/suggestions` | Suggested prompts for a set. | read | `rivier analytics prompt suggest` |
| DELETE | `/prompts/{id}` | Delete a prompt. | write | `rivier analytics prompt delete` |
| GET | `/prompt-runs` | Prompt run results. | read | `rivier analytics prompt runs` |
| GET | `/prompt-runs.csv` | The runs as CSV. | read | `rivier analytics prompt runs csv` |
| GET | `/prompt-gaps` | Prompts where the business is not cited. | read | `rivier analytics prompt gaps` |
| GET | `/prompt-gaps.csv` | The gaps as CSV. | read | `rivier analytics prompt gaps csv` |
| GET | `/prompt-sentiment` | How answers describe the business. | read | `rivier analytics prompt sentiment` |
| GET | `/prompt-sentiment.csv` | The sentiment as CSV. | read | `rivier analytics prompt sentiment csv` |
