Success metric#

The one number a workspace treats as success, such as sign ups or booked meetings, and the GA4 event that counts it.

Authentication required

All endpoints require a Bearer token in the Authorization header. See the Authentication guide for setup instructions.

GET /v1/success-metric#

Get the workspace's success metric: the one number it treats as success, in its own words (sign ups, purchases, booked meetings), and the GA4 event that counts it when one is linked. Name is null until the workspace says what success is.

bash
GET /v1/success-metric?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.

Response#

Returns { data, _meta } with the result.

PUT /v1/success-metric#

Update the workspace's success metric: its name in the workspace's own words and, optionally, the GA4 event that counts it. Linking a different event stops tracking the old one and removes its synced counts. An event tracked as an interest action becomes the success metric instead. Event history is backfilled automatically.

Owner only
bash
PUT /v1/success-metric
Authorization: Bearer {token}
Content-Type: application/json

{
  "workspace_id": "1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01",
  "name": "My Campaign"
}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
namestringRequiredThe one number this workspace treats as success, in its own words, such as "Sign ups" or "Booked meetings".
eventobject | null—The GA4 event that counts the success metric. Null unlinks it; leave it out to keep the current link. History is backfilled when a new event is linked.

Response#

Returns { data, _meta } with the result.

PUT /v1/success-metric/dimensions#

Select which registered GA4 custom dimensions to read for the success metric's event, such as a "how did you hear about us" answer, and backfill their counts.

Owner only
bash
PUT /v1/success-metric/dimensions
Authorization: Bearer {token}
Content-Type: application/json

{
  "workspace_id": "1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01",
  "dimensions": "..."
}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
dimensionsArray<object>RequiredEvery registered GA4 custom dimension to read for the success metric's event.

Response#

Returns { items, totalCount, facets, _meta } with paginated results.