Skip to content
Website API / Goals

Goal properties

GEThttps://<your Reveata origin>/api/v1/websites/{website}/goals/{goalName}/properties

One goal with the values of the custom properties sent with it.

Related: Goals report and Goals over time in Goals.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

goalNamestringrequired

Pattern: ^[a-z0-9][a-z0-9_:-]{0,63}$

Query parameters

periodstringoptional

One of: realtime, today, yesterday, last_24h, last_7d, last_30d, last_90d, last_12m, week_to_date, last_week, month_to_date, last_month, year_to_date, all, custom · Default: "last_30d"

fromstringoptional

Pattern: ^\d{4}-\d{2}-\d{2}$

tostringoptional

Pattern: ^\d{4}-\d{2}-\d{2}$

granularitystringoptional

One of: minute, hour, day, week, month

comparestringoptional

One of: previous_period, previous_period_dow, year_over_year, custom, none · Default: "previous_period"

compareFromstringoptional

Pattern: ^\d{4}-\d{2}-\d{2}$

compareTostringoptional

Pattern: ^\d{4}-\d{2}-\d{2}$

filtersobject[] | stringoptional
segmentstringoptional

Pattern: ^[a-f0-9]{24}$

pinstringoptional

1–22 characters

Headers

Authorizationstringrequired

Bearer followed by a site key, an account token or an OAuth access token with the goals:read scope.

Response

Goal.

{
  "status": "string",
  "data": {
    "range": {
      "from": "string",
      "to": "string",
      "timezone": "string"
    },
    "goal": {
      "name": "string",
      "displayName": "string",
      "description": "string",
      "colour": "string",
      "hidden": true,
      "kpi": true,
      "customized": true,
      "values": {
        "completions": 0,
        "visitors": 0,
        "conversionRate": "string",
        "revenue": "string"
      },
      "previous": {
        "completions": 0,
        "visitors": 0,
        "conversionRate": "string",
        "revenue": "string"
      }
    },
    "properties": [
      {
        "key": "string",
        "total": 0,
        "values": [
          {
            "value": "string",
            "count": 0
          }
        ]
      }
    ]
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.rangeobject
data.range.fromstring
data.range.tostring
data.range.timezonestring
data.goalobject
data.goal.namestring
data.goal.displayNamestring | null | null
data.goal.descriptionstring | null | null
data.goal.colourstring | null | null
data.goal.hiddenboolean
data.goal.kpiboolean
data.goal.customizedboolean
data.goal.valuesobject
data.goal.values.completionsinteger
data.goal.values.visitorsinteger
data.goal.values.conversionRatenumber | null | null
data.goal.values.revenueinteger | null | null
data.goal.previousobject | null | null
data.goal.previous.completionsinteger
data.goal.previous.visitorsinteger
data.goal.previous.conversionRatenumber | null | null
data.goal.previous.revenueinteger | null | null
data.propertiesobject[]
data.properties[].keystring
data.properties[].totalinteger
data.properties[].valuesobject[]
data.properties[].values[].valuestring
data.properties[].values[].countinteger