Mark an event as a goal, or stop
set_goalMarks one of a site's declared events as a goal (what the site is for: a sale, a sign-up, a contact), so that conversions are counted for it by source and campaign, or removes the mark. Past visits are counted too. The event must be declared first (create_event). For a goal that is not a payment (a click to Amazon, a sign-up), value is what one conversion is worth to the owner: their estimate, shown as estimated and never added to revenue. Set it only with the amount the owner gives.
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>",
"event": "<event>",
"goal": "<goal>"
},
"name": "set_goal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | Yes | True to make it a goal, false to stop. | |
| site | Yes | The site: its domain (example.com), its id, or its public id. See list_sites. | |
| event | Yes | The event's name or label, as list_events gives it. | |
| value | No | What one conversion is worth to the owner, in the currency's units (2.10). null removes it; omit to leave it as it is. | |
| currency | No | Three-letter currency of `value` (EUR, USD…). Needed with a value. |