API reference / Analytics
Change a goal
Changes the label, colour and description of a goal on the dashboard, or hides the goal there. Its completions stay as they are. With page, the goal becomes a page goal: each view of a matching page counts, also the views from before. page null makes it a goal of events again. A goal name that no event has yet is a new page goal.
/api/v1/analytics/goals/{name}Other ways to call it
troopy analytics goals updateIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Path parameters
name*stringLowercase letters, digits, _ - and :
Body
application/jsonlabelstring | nullcolorenum<string> | nullstoneskymintsandrosepeachcyanorange
descriptionstring | nullhiddenbooleanpagestring | nullA path such as /pricing or /blog/**. * matches within one part of the path, ** across parts
Response
200 · application/jsondata*object6 properties
name*stringlabel*string | nullThe dashboard shows it instead of the name
color*enum<string> | nullstoneskymintsandrosepeachcyanorange
description*string | nullhidden*booleanThe dashboard does not show it. Its events stay
page*string | nullA page goal: each view of a page that matches this path counts as the goal. * matches within one part of the path, ** matches across parts