---
name: "analytics_stats"
area: "analytics"
title: "Read a site's stats"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/analytics_stats"
mcp_server: "https://api.conecto.chat/mcp/analytics"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/analytics/analytics_stats"
---

# Read a site's stats (`analytics_stats`)

A site's visitors, pages, sources, countries, devices, events, goals and speed for a period, against the period before.

Visitors (counted per day), pageviews, visits, bounce rate, visit length, time on page and scroll depth, against the period before; by day (or by hour for one day); top, entry and exit pages; channels (search, social, AI assistants, email, paid...), sources, referrers and UTM campaigns; countries, devices, browsers, operating systems; custom events; goals with conversion rates and revenue; and Core Web Vitals. A visit keeps the source it came from on every page. filters narrow all of it.

Price: Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads. A call that fails costs nothing.

## Use it when

Someone asks how the website is doing, or where its visitors come from.

- For a page of these numbers for a person to look at, use [analytics_view_link](https://conecto.chat/tools/analytics/analytics_view_link.md).
- For who is on the site right now, use [analytics_realtime](https://conecto.chat/tools/analytics/analytics_realtime.md).

## Say this to your agent

> How much traffic did ChatGPT and the other AI assistants send us in the last 30 days, and where did those visitors land?

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `site` | string | yes | The site's domain (e.g. halversoncycle.example) or its site_id. 4 to 253 characters. |  |  |
| `period` | string | no |  | `"today"`, `"yesterday"`, `"7d"`, `"30d"`, `"90d"`, `"month"`, `"last_month"`, `"12mo"`, `"custom"` | `"30d"` |
| `from` | string | no | With period custom: the first day, 2026-10-01. Up to 10 characters. |  |  |
| `to` | string | no | With period custom: the last day. Up to 10 characters. |  |  |
| `filters` | object | no | Narrow the stats: page and entry_page ("/blog/*", * for any part), goal (a goal's name), event, channel (Direct, Organic search, Paid search, Organic social, Paid social, AI assistants, Email, Referral, Affiliates, Display, Paid other, Other campaigns), source ("Google", "Direct"), referrer, campaign, medium, term, content, country ("DE"), device (desktop, tablet, mobile), browser, os. Example: {"channel": "Organic search", "device": "mobile"}. |  |  |
| `limit` | integer | no | 1 to 50. |  | `10` |

## Example

Written for Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon.

MCP: call `analytics_stats` on the MCP server `https://api.conecto.chat/mcp/analytics` with these arguments:

```json
{
  "site": "halversoncycle.example",
  "period": "30d",
  "filters": {
    "channel": "AI assistants"
  }
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/analytics_stats \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"site": "halversoncycle.example", "period": "30d", "filters": {"channel": "AI assistants"}}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "analytics_stats",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "site": "halversoncycle.example",
    "period": {
      "from": "2026-09-15",
      "to": "2026-10-14",
      "time_zone": "America/Los_Angeles"
    },
    "filters": {
      "channel": "AI assistants"
    },
    "visitors": 1,
    "pageviews": 5,
    "visits": 1,
    "bounce_rate": 0,
    "visit_seconds": 0,
    "views_per_visit": 5.0,
    "time_on_page_seconds": null,
    "scroll_depth_percent": null,
    "change_percent": {
      "visitors": null,
      "pageviews": null,
      "visits": null
    },
    "timeseries": [
      {
        "day": "2026-10-14",
        "visitors": 1,
        "pageviews": 5
      }
    ],
    "pages": [
      {
        "page": "/",
        "visitors": 1,
        "pageviews": 1,
        "time_on_page_seconds": null,
        "scroll_depth_percent": null
      },
      {
        "page": "/bikes/tabor",
        "visitors": 1,
        "pageviews": 1,
        "time_on_page_seconds": null,
        "scroll_depth_percent": null
      }
    ],
    "entry_pages": [
      {
        "page": "/",
        "visits": 1
      }
    ],
    "exit_pages": [
      {
        "page": "/checkout/done",
        "visits": 1
      }
    ],
    "channels": [
      {
        "channel": "AI assistants",
        "visitors": 1,
        "visits": 1
      }
    ],
    "sources": [
      {
        "source": "ChatGPT",
        "visitors": 1,
        "visits": 1
      }
    ],
    "referrers": [
      {
        "referrer": "chatgpt.com",
        "visitors": 1,
        "visits": 1
      }
    ],
    "campaigns": [],
    "mediums": [],
    "terms": [],
    "contents": [],
    "countries": [
      {
        "country": "US",
        "visitors": 1,
        "pageviews": 5
      }
    ],
    "countries_source": "IP Geolocation by DB-IP (https://db-ip.com)",
    "devices": [
      {
        "device": "desktop",
        "visitors": 1,
        "pageviews": 5
      }
    ],
    "browsers": [
      {
        "browser": "Chrome",
        "visitors": 1,
        "pageviews": 5
      }
    ],
    "operating_systems": [
      {
        "os": "macOS",
        "visitors": 1,
        "pageviews": 5
      }
    ],
    "events": [
      {
        "event": "Purchase",
        "count": 1,
        "visitors": 1
      }
    ],
    "goals": [],
    "web_vitals": [
      {
        "metric": "LCP",
        "p75": null,
        "unit": "ms",
        "samples": 0,
        "rating": null
      },
      {
        "metric": "INP",
        "p75": null,
        "unit": "ms",
        "samples": 0,
        "rating": null
      }
    ]
  }
}
```

`result`: Visitors, pageviews, visits, bounce rate, visit length, time on page and scroll depth with the change against the period before; a series by day; top, entry and exit pages; channels, sources, referrers and campaigns; countries, devices, browsers and systems; events, goals and Web Vitals.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No site the business counts has that domain or site_id. | Call analytics_list_sites and use a domain from it. |
| `invalid_input` | 400 | The period, the from and to dates, a page pattern or a filter is not valid. | Fix the argument the message names. A custom period needs from and to as dates, like 2026-10-01. |
| `rate_limited` | 429 | The business ran more analytics reports this minute than its limit allows. | Wait a minute, then call again. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [analytics_add_site](https://conecto.chat/tools/analytics/analytics_add_site.md): Starts counting visits to a website, without cookies, and returns the snippet for its pages. $3.00 a call.
- [analytics_install](https://conecto.chat/tools/analytics/analytics_install.md): Step-by-step instructions to put the counting script on a site: any html, Shopify, WordPress, Webflow or Google Tag Manager. Free up to 1,000,000 reads a month.
- [analytics_breakdown](https://conecto.chat/tools/analytics/analytics_breakdown.md): One event or goal by a prop or by where its visits came from, with conversions, conversion rate and revenue. Free up to 1,000,000 reads a month.
- [analytics_realtime](https://conecto.chat/tools/analytics/analytics_realtime.md): Visitors in the last 5 minutes, and the pages people looked at in the last 30. Free up to 1,000,000 reads a month.
- [analytics_set_goals](https://conecto.chat/tools/analytics/analytics_set_goals.md): Sets the conversions a site counts: pages reached or events, replacing its goals; with notify, the agent hears of each one as it happens. Free.
- [analytics_define_events](https://conecto.chat/tools/analytics/analytics_define_events.md): Defines events from what the script already sees (clicks, pages, scrolling, time on a page, props), with nobody editing the site. Free.
- [analytics_track](https://conecto.chat/tools/analytics/analytics_track.md): Records events that happen away from the site, like orders, deals won or renewals, tied to the visit that led to them when it can be found. Free.
- [analytics_funnel](https://conecto.chat/tools/analytics/analytics_funnel.md): How many visitors did each step of a path in order, and how many dropped out at each one. Free up to 1,000,000 reads a month.
- [analytics_paths](https://conecto.chat/tools/analytics/analytics_paths.md): Where visits went after a page and where they came from, or the commonest journeys through the site. Free up to 1,000,000 reads a month.
- [analytics_heatmap](https://conecto.chat/tools/analytics/analytics_heatmap.md): A page's heatmap: the most clicked elements, rage and dead clicks, scroll depth and time on page, with a link that draws it. Free up to 1,000,000 reads a month.
- [analytics_problems](https://conecto.chat/tools/analytics/analytics_problems.md): Pages that answered an error to visitors, JavaScript errors, and where people rage-click or click with nothing happening. Free up to 1,000,000 reads a month.
- [analytics_web_vitals](https://conecto.chat/tools/analytics/analytics_web_vitals.md): How fast the site's pages are for real visitors: Core Web Vitals at the 75th percentile, rated the way Google rates them. Free up to 1,000,000 reads a month.
- [analytics_view_link](https://conecto.chat/tools/analytics/analytics_view_link.md): A one-time link to a page that shows a site's stats to a person. Free.
- [analytics_update_site](https://conecto.chat/tools/analytics/analytics_update_site.md): Changes a site's name, time zone, traffic alert, weekly summary, JavaScript errors and whether where leads came from is kept with them. Free.
- [analytics_list_sites](https://conecto.chat/tools/analytics/analytics_list_sites.md): Every site this account counts, with this month's events and its snippet. Free up to 1,000,000 reads a month.
- [analytics_add_events](https://conecto.chat/tools/analytics/analytics_add_events.md): Raises a site's monthly event allowance by blocks of a million events. $5.00 per block of a million events a month.
- [analytics_remove_site](https://conecto.chat/tools/analytics/analytics_remove_site.md): Stops counting a site, ends its rent and deletes its stats for good. Free.
