Create an event to count
create_eventDeclares something to count on a site and returns how to install it, step by step: a click on a button or link (no JavaScript, a class to add), a page reached (nothing to install, e.g. a thank-you page), a link to another site (nothing to install, e.g. a booking platform: every click to it counts), or an action sent by the site's own code. Clicks to other sites, email addresses, phone numbers, files, and forms on WordPress are already counted by themselves (auto:…): do not create an event for them, use set_goal. Pass platform so the steps fit the tool the site is made with.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>",
"label": "<label>",
"kind": "<kind>"
},
"name": "create_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | True when this is what the site is for (a sale, a sign-up, a contact): conversions are then counted for it. | |
| kind | Yes | click, page (a page reached), link (a link to another site) or code. | |
| name | No | For kind code: the exact name the site's code already sends (e.g. signup_created), kept as is. Without it, the name is made from the label. | |
| page | No | For kind page: the page address, e.g. /thank-you or https://example.com/thank-you. When the same page has several addresses (one per language: /pricing and /fr/pricing), give them all, separated by commas: one event counts them together. An address that ends with * counts every address that begins so (/checkout/order-received/*). | |
| site | Yes | The site: its domain (example.com), its id, or its public id. See list_sites. | |
| label | Yes | The name the user gives it, e.g. Newsletter sign-up. | |
| targets | No | For kind link: the site the links lead to, a domain (its subdomains count too) optionally followed by the start of a path, e.g. axyomes.com or example.org/booking. Several, separated by commas. | |
| platform | No | The tool the site is made with, so that the steps fit it. Ask the user if unsure. |