Skip to content
Website API / Goals

Track a goal from your server

POSThttps://<your Reveata origin>/api/v1/websites/{website}/events

Records a custom goal (for example signup after your backend confirms an account). Pass the visitor id from the browser to credit the visit that led to it; it then joins that visit and its traffic source. ts may be up to 30 days in the past.

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

Headers

Authorizationstringrequired

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

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

namestringrequired

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

visitorIdstringoptional

8–64 characters

sessionIdstringoptional

8–64 characters

propsobject<string, string>optional

Keys up to 64 characters · Values up to 512 characters

tsstring (date-time)optional

Response

Accepted for processing.

{
  "status": "string",
  "data": {
    "accepted": true,
    "outcome": "string",
    "visitorId": "string",
    "sessionId": "string"
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.acceptedboolean
data.outcomestring
data.visitorIdstring
data.sessionIdstring