List Goals
List all goals for a site.
List Goals
Returns all goals configured for the given site.
Endpoint
GET /api/v1/organizations/:orgId/sites/:siteId/goals
Response fields
Each goal object contains:
| Field | Type | Description |
|---|---|---|
id | string | Goal ID |
site_id | string | Site ID |
name | string | Goal display name |
type | string | pageview or custom_event |
pattern | string | Page path or event name to match |
match_type | string | exact, contains, or regex |
value | number | Optional monetary value per conversion |
currency | string | Optional currency code (e.g. USD) |
Goal Stats
To get conversion stats for all goals in a period:
GET /api/v1/organizations/:orgId/sites/:siteId/goals/stats
Returns an array of stats per goal:
| Field | Type | Description |
|---|---|---|
goal_id | string | Goal ID |
name | string | Goal name |
type | string | Goal type |
conversions | number | Total conversions |
unique_conversions | number | Unique visitor conversions |
revenue | number | Total revenue from conversions |
conversion_rate | number | Percentage of visitors who converted |