Track events from outside the site
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
This tool costs nothing to call.
An example
The Alder Street Hotel ordered 8 guest bikes for $9,400. Count it as a won deal and credit the campaign that brought them.
Your agent callsanalytics_trackFree
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.
{
"site": "halversoncycle.example",
"events": [
{
"name": "Deal won",
"email": "events@alderstreethotel.example",
"revenue": 9400,
"currency": "USD",
"props": {
"pipeline": "Fleet"
}
}
]
}Use it when
Something worth counting happened outside the website: a Shopify order, a deal won, a call that booked a demo.
- For something that happens on the site's own pages, use
analytics_define_events.
What it does
Record what happened away from the site's pages: a Shopify order, a deal won, a call that booked a demo, a renewal. Up to 100 at once, each with props and revenue. An event joins the visit that led to it when you give the visitor's IP address and user agent (a Shopify order carries both; they find the visit and are never kept), or the email or contact of a person whose first visit Conecto kept; otherwise it counts without a source. Then analytics_breakdown shows which channels and campaigns bring the money. Don't track what the site itself already sends, or it counts twice. Free; each event counts toward the site's monthly events.
What comes back
Each event with whether it was stored and what it was tied to (the visit, the contact's first visit, or nothing), with its source, channel and campaign; stored: how many were kept. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
siteRequired | string | The site's domain (e.g. halversoncycle.example) or its site_id. 4 to 253 characters. |
eventsRequired | array of objects | 1 to 100 items. |
events[].nameRequired | string | Up to 60 characters. |
events[].props | object | Up to 10 plain values, like {"plan": "pro"}. |
events[].revenue | number or string | The money it brought, like 129.90. |
events[].currency | string | Exactly 3 characters. |
events[].at | string | When it happened, with its offset; now if left out. Up to 40 characters. |
events[].visitor | object | The IP address and user agent the order or form came from, as Shopify and most forms record them: to find the visit that led to it. Used once, never kept. |
events[].visitor.ip | string | Up to 45 characters. |
events[].visitor.user_agent | string | Up to 500 characters. |
events[].email | string | A person whose first visit Conecto kept: the event is credited to it. Up to 254 characters. |
events[].contact_id | integer | The same, by CRM contact. |
events[].page | string | Where it happened, like /checkout. Up to 500 characters. |
The call
Over MCP, call analytics_track on https://api.conecto.chat/mcp/analytics. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/analytics_track \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"site":"halversoncycle.example","events":[{"name":"Deal won","email":"events@alderstreethotel.example","revenue":9400,"currency":"USD","props":{"pipeline":"Fleet"}}]}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
not_found404 | No site the business counts has that domain or site_id. | Call analytics_list_sites and use a domain from it. |
invalid_input400 | An event has no name, an IP address that is not one, a time outside the last 30 days or revenue without a currency, or there are more than 100. | Fix the event the message names. |
More Website analytics tools
All 18 tools- Count a website's visits
analytics_add_siteStarts counting visits to a website, without cookies, and returns the snippet for its pages.$3.00 a call - 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 - 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