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. Free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| note | No | ||
| type | Yes | ||
| match | No | Needed except for ENGAGED and CHECKOUT | |
| siteId | No | ||
| valueCents | No |