Count a website's visits
Starts counting visits to a website, without cookies, and returns the snippet for its pages.
$3.00 a call
From your agent’s balance. A call that fails costs nothing.
An example
Set up visitor stats for our website and tell me what to paste where.
Your agent callsanalytics_add_site$3.00 a call
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.
{
"domain": "halversoncycle.example",
"name": "Halverson Cycle & Repair",
"time_zone": "America/Los_Angeles"
}Use it when
The business wants visitor numbers for a website it runs.
What it does
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.
What comes back
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. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
domainRequired | string | The site, e.g. halversoncycle.example (www. and other subdomains count too). 4 to 253 characters. |
name | string | Up to 120 characters. |
time_zone | string | The days of the stats; the business calendar's time zone if left out. Up to 64 characters. |
The call
Over MCP, call analytics_add_site on https://api.conecto.chat/mcp/analytics. Over REST:
curl -X POST 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"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
invalid_input400 | 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. |
conflict409 | The business already counts this domain. | Use the site you have: analytics_list_sites shows its snippet. |
limit_reached409 | 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. |
More Website analytics tools
All 18 tools- Get install steps
analytics_installStep-by-step instructions to put the counting script on a site: any html, Shopify, WordPress, Webflow or Google Tag Manager.Free* - Read a site's stats
analytics_statsA site's visitors, pages, sources, countries, devices, events, goals and speed for a period, against the period before.Free* - Break an event or goal down
analytics_breakdownOne event or goal by a prop or by where its visits came from, with conversions, conversion rate and revenue.Free* - Who is on a site now
analytics_realtimeVisitors in the last 5 minutes, and the pages people looked at in the last 30.Free* - Set a site's goals
analytics_set_goalsSets the conversions a site counts: pages reached or events, replacing its goals; with notify, the agent hears of each one as it happens.Free - Define events without touching the site
analytics_define_eventsDefines events from what the script already sees (clicks, pages, scrolling, time on a page, props), with nobody editing the site.Free - Track events from outside the site
analytics_trackRecords 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 - See where people drop off
analytics_funnelHow many visitors did each step of a path in order, and how many dropped out at each one.Free*
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md