List goals
List the goals set up in the site settings.
GET https://cotlet.dev/api/v1/plausible/goals
read
Returns each goal with its display name, trigger (pageview or custom_event) and the page path or event name it matches. It lists the goals as configured, whether or not anyone has converted yet. Use it before add_goal to avoid a duplicate.
Parameters
| Name | Type | Description |
|---|---|---|
| site string required | string | Domain of the site as the Sites page lists it, e.g. acme-shop.example. |
Request
curl "https://cotlet.dev/api/v1/plausible/goals?site=site" \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("plausible", "list_goals", {"site":"site"}) const result = await cotlet.call('plausible', 'list_goals', {"site":"site"}); cotlet call plausible list_goals --data '{"site":"site"}' Example response
{
"site": "acme-shop.example",
"goals": [
{
"name": "Checkout complete",
"trigger": "pageview",
"target": "/checkout/thank-you"
},
{
"name": "Newsletter signup",
"trigger": "custom_event",
"target": "Newsletter Signup"
}
]
}