Conversions

Replace a conversion goal's definition

Changed on
put/projects/{project_id}/analytics/goals/{goal_id}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

project_idinteger required

Project ID

goal_idinteger required

Goal ID

Request body

event_namestring nullable

Required for event goals, refused for page goals.

kind'event' | 'page' required

What a goal matches.

namestring required

Shown in the Conversions report, e.g. "Signup". Unique per project, ignoring case.

page_pathstring nullable

Required for page goals, refused for event goals. Starts with /; * matches any run of characters, e.g. /thank-you or /docs/*.

revenue_currencystring nullable

ISO 4217 currency code of revenue_property, e.g. EUR.

revenue_propertystring nullable

Event property holding the value of one conversion, e.g. amount. Event goals only; requires revenue_currency.

Example request

{
  "event_name": "signup",
  "name": "Signup",
  "page_path": "/thank-you",
  "revenue_currency": "EUR",
  "revenue_property": "amount"
}

Response

Goal updated

created_atstring date-time required
event_namestring nullable
idinteger required
kind'event' | 'page' required

What a goal matches.

namestring required
page_pathstring nullable
project_idinteger required
revenue_currencystring nullable
revenue_propertystring nullable
updated_atstring date-time required

Changes