Track Goal Event
track_goalRecord a single completion of a custom goal, creating it on first use. Attach it to a visitor or session so conversions are counted in analytics; repeat calls count again.
Instructions
Record one completion of a custom goal. The goal is created on first use, so no setup call is needed. Pass visitorUid (the anonymous visitor ID Flowsery assigned on the user's own website) so the completion attaches to that visitor's sessions and source; omit it for an anonymous completion. Each call appends a completion, so repeating it counts the goal twice. Use track_payment for revenue, which records a payment goal on its own. Undo with delete_goals. Requires websiteId or domain with a workspace token.
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>"
},
"name": "track_goal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Which goal was completed, e.g. "newsletter_signup" or "add-to-cart". Reuse the exact name for repeat completions: get_goals, filter_goal and delete_goals all match on it. | |
| domain | No | Website domain from list_websites (e.g. "example.com"). Alternative to websiteId with a workspace token. | |
| metadata | No | Extra context saved with this completion, such as { "plan": "pro", "source": "footer" }. At most 10 keys; omit when there is nothing to add. | |
| timezone | No | The visitor's IANA timezone (e.g. "Europe/Berlin"). Helps place the visitor in a country when the call comes from a server or proxy. | |
| websiteId | No | Website ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key. | |
| sessionUid | No | Session ID of the visitor's current session (the _fs_sid value). Ties the completion to that session; without it a server-side call uses the visitor's latest active session. | |
| visitorUid | No | Anonymous visitor ID Flowsery assigned on the user's own website (the _fs_vid value). Omit to record an anonymous completion. | |
| workspaceId | No | Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace do not exist in another |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |