Delete a goal
Delete a conversion goal with the Clics TypeScript SDK when a tracked action is no longer needed.
Removes a goal from a project. Conversion metrics for that goal stop accumulating immediately.
Use when deprecating a conversion, cleaning up test goals, or syncing goal definitions from an external source of truth.
Parameters
| Field | Required | Description |
|---|---|---|
goalId |
Yes | Goal to delete |
Signature
clics.goals.deleteGoal(request, options?)
Example
import { Clics } from "@clicsdev/sdk";
const clics = new Clics({
apiKey: process.env.CLICS_API_KEY!,
});
const result = await clics.goals.deleteGoal({
goalId: "goal_xxx",
});
console.log(result.deleted);
What it returns
| Field | Type | Description |
|---|---|---|
deleted |
boolean |
true when Clics accepted the deletion request |
Notes
- Funnels that reference the deleted goal’s pages or events are not automatically updated: review funnel steps after deleting related goals
- Cannot delete goals on projects with
status: "deleting"
API reference
See Delete a goal for request and response schemas, status codes, and error types.