Skip to content
Website API / Goals

Goals report

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

Every goal completed in the date range with completions, converting visitors, conversion rate and revenue from converters, plus the display settings set in the dashboard. Takes the same date range and filters as the analytics endpoints.

Try in playground

Request

Path parameters

websitestringrequired

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

1–253 characters

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

Goals.

{
  "status": "string",
  "data": {
    "range": {
      "from": "string",
      "to": "string",
      "timezone": "string"
    },
    "previousRange": {
      "from": "string",
      "to": "string",
      "timezone": "string"
    },
    "currency": "string",
    "totals": {
      "visitors": 0,
      "completions": 0,
      "conversionRate": "string",
      "revenue": "string"
    },
    "goals": [
      {
        "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"
        }
      }
    ]
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.rangeobject
data.range.fromstring
data.range.tostring
data.range.timezonestring
data.previousRangeobject | null | null
data.previousRange.fromstring
data.previousRange.tostring
data.previousRange.timezonestring
data.currencystring
data.totalsobject
data.totals.visitorsinteger
data.totals.completionsinteger
data.totals.conversionRatenumber | null | null
data.totals.revenueinteger | null | null
data.goalsobject[]
data.goals[].namestring
data.goals[].displayNamestring | null | null
data.goals[].descriptionstring | null | null
data.goals[].colourstring | null | null
data.goals[].hiddenboolean
data.goals[].kpiboolean
data.goals[].customizedboolean
data.goals[].valuesobject
data.goals[].values.completionsinteger
data.goals[].values.visitorsinteger
data.goals[].values.conversionRatenumber | null | null
data.goals[].values.revenueinteger | null | null
data.goals[].previousobject | null | null
data.goals[].previous.completionsinteger
data.goals[].previous.visitorsinteger
data.goals[].previous.conversionRatenumber | null | null
data.goals[].previous.revenueinteger | null | null