Create or redefine a goal
goals_saveCreate a goal, or redefine one with the same name: EVENT (an event name like signup, or name@/path for that event on one page: form_submit@/register is the signup form sent on /register, which t.js reports with no code on the site), PAGEVIEW (a path pattern like /welcome*), CTA (a data-sf value, * for a wildcard), ENGAGED, REVENUE (trial, paid), or CHECKOUT (a visit back from a hosted checkout such as Stripe or Dodo: a payment, seen without any code on the site; match is the return path pattern, * for any). Every goal you create is SOFT. Only the founder makes a goal HARD, in the results app, and the headline conversions count HARD goals once there are any; changing a HARD goal's definition puts it back to SOFT. Say why in note. stage puts it on the way to a payment: interest (clicks and pages before signing up, the signup page itself included), engaged, signup (a finished signup, each way of signing up is its own goal in this stage and the stage counts a session once), active (a signed-up person using the product), paying. Left out, it is read from the goal. Free.
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": {
"name": "<name>",
"type": "<type>"
},
"name": "goals_save"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| note | No | ||
| type | Yes | ||
| match | No | Needed except for ENGAGED and CHECKOUT | |
| stage | No | ||
| siteId | No | ||
| valueCents | No |