Website analytics

Read a site's stats

analytics_stats · Reads only · Markdown

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

Free*

*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.

An example

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

Your agent callsanalytics_statsFree*

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "site": "halversoncycle.example",
  "period": "30d",
  "filters": {
    "channel": "AI assistants"
  }
}
What comes back
{
  "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,
  "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
    }
  ]
}

Use it when

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

What it does

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.

What comes back

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. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
siteRequiredstringThe site's domain (e.g. halversoncycle.example) or its site_id. 4 to 253 characters.
periodstringOne of: today,yesterday,7d,30d,90d,month,last_month,12mo,custom. Default: 30d.
fromstringWith period custom: the first day, 2026-10-01. Up to 10 characters.
tostringWith period custom: the last day. Up to 10 characters.
filtersobjectNarrow 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"}.
limitinteger1 to 50. Default: 10.

The call

Over MCP, call analytics_stats on https://api.conecto.chat/mcp/analytics. Over REST:

Terminal
curl -X POST 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"}}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No site the business counts has that domain or site_id.Call analytics_list_sites and use a domain from it.
invalid_input400The 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_limited429The business ran more analytics reports this minute than its limit allows.Wait a minute, then call again.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md