create_goal
Add a conversion goal to a site by tracking a custom event, a page path with match operator, or scroll depth. Duplicate goal names are refused.
Instructions
Add a goal to a site. A goal is EITHER a custom event (event_name), OR a page (path with operator), OR a scroll depth — give one of the three, not several. operator: "e" exact, "b" begins with, "c" contains. A duplicate name is refused (goal_exists).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Shown in reports, e.g. "Signup". | |
| path | No | Page path, e.g. "/thanks". Pair with operator. | |
| site | Yes | site_id from list_sites. | |
| operator | No | How path is matched: e exact, b begins with, c contains. | |
| event_name | No | Custom event to count, e.g. "Signup". Use list_prop_keys or top_custom_events to see what the site already sends. | |
| scroll_depth | No | Percent scrolled. |