---
name: "analytics_add_site"
area: "analytics"
title: "Count a website's visits"
price: "$3.00"
method: "POST"
url: "https://api.conecto.chat/v1/tools/analytics_add_site"
mcp_server: "https://api.conecto.chat/mcp/analytics"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/analytics/analytics_add_site"
---

# Count a website's visits (`analytics_add_site`)

Starts counting visits to a website, without cookies, and returns the snippet for its pages.

Start counting visits to a website, like Plausible or Umami: add the returned snippet to every page, before </head>. It uses no cookies and keeps no IP addresses. When a visitor becomes a contact through Conecto's chat, a booking, a form or a newsletter signup, the visit that brought them is kept with their contact. Custom events: conecto("Signup", {"plan": "pro"}) in the page, with revenue as a third argument ({revenue: 49.9, currency: "USD"}), or define them without touching the site (analytics_define_events). It also counts on its own clicks on links to other sites, phone and email links, file downloads, form submissions, searches on the site, pages that answer an error, elements with data-conecto-event="Name", and Conecto's own chats, bookings, forms and signups that start on the site; and keeps clicks and scrolling for heatmaps and the pages' Core Web Vitals. analytics_install has the steps for Shopify, WordPress and others. $3 a month with 100,000 events, renewed from the balance; the first month is this call.

Price: $3.00 a call. A call that fails costs nothing.

## Use it when

The business wants visitor numbers for a website it runs.

## Say this to your agent

> Set up visitor stats for our website and tell me what to paste where.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `domain` | string | yes | The site, e.g. halversoncycle.example (www. and other subdomains count too). 4 to 253 characters. |  |  |
| `name` | string | no | Up to 120 characters. |  |  |
| `time_zone` | string | no | The days of the stats; the business calendar's time zone if left out. Up to 64 characters. |  |  |

## Example

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

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

```json
{
  "domain": "halversoncycle.example",
  "name": "Halverson Cycle & Repair",
  "time_zone": "America/Los_Angeles"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/analytics_add_site \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain": "halversoncycle.example", "name": "Halverson Cycle & Repair", "time_zone": "America/Los_Angeles"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "analytics_add_site",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$3.00",
  "balance_usd": "$19.75",
  "result": {
    "site": {
      "site_id": "5fb4a89a-035a-4e59-a550-d9760f2c092d",
      "domain": "halversoncycle.example",
      "name": "Halverson Cycle & Repair",
      "time_zone": "America/Los_Angeles",
      "snippet": "<script defer src=\"https://cncto.co/a.js\" data-site=\"5fb4a89a-035a-4e59-a550-d9760f2c092d\"></script>",
      "events_this_month": 0,
      "clicks_this_month": 0,
      "allowance_per_month": 100000,
      "extra_blocks": 0,
      "monthly_usd": "$3.00",
      "goals": [],
      "events": [],
      "spike_alert_visitors": null,
      "weekly_summary": false,
      "track_errors": false,
      "keep_sources": true,
      "created_at": "2026-10-14T08:00:00+00:00"
    },
    "rent": {
      "rental_id": 4101,
      "kind": "site",
      "label": "Analytics: halversoncycle.example",
      "status": "active",
      "monthly_usd": "$3.00",
      "renews_at": "2026-11-14T08:00:00+00:00",
      "grace_until": null
    },
    "install": "Put the snippet in the <head> of every page. Visits show up in analytics_stats within seconds. analytics_install has the steps for Shopify (with a pixel for carts and purchases), WordPress, Webflow and Google Tag Manager."
  }
}
```

`result`: The site with its site_id and the snippet for every page's <head>, this month's events, its allowance and monthly price, the rental that renews it each month, and how to install it.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `invalid_input` | 400 | The domain is not a site address, or time_zone is not a zone name. | Send the domain alone, like halversoncycle.example, and a zone like America/Los_Angeles. |
| `conflict` | 409 | The business already counts this domain. | Use the site you have: analytics_list_sites shows its snippet. |
| `limit_reached` | 409 | The business counts as many sites as it may. | Stop counting a site it no longer needs with analytics_remove_site, then add the new one. |

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_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_stats](https://conecto.chat/tools/analytics/analytics_stats.md): A site's visitors, pages, sources, countries, devices, events, goals and speed for a period, against the period before. 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.
