Skip to content

reveata events

View as Markdown

Record a custom goal from your server or a script, credited to the visit that led to it.

reveata events send records a custom goal from your server, for example a signup confirmed by your backend. It needs the goals:write scope, which site keys have.

Pass the visitor id from the browser (reveata.visitorId() in the tracking script) to credit the goal to the visit that led to it. --timestamp may be up to 30 days in the past.

reveata events send <goalName>

Record a custom goal from your server (e.g. signup).

Pass the visitor id from the browser (reveata.visitorId()) to credit the visit that led to the goal; it joins that visitor’s latest visit unless --session-id names one. Without a visitor the goal is counted without a traffic source. Needs the goals:write scope (site keys have it).

Options:

  • --site <id|domain>: Website id or domain (defaults to REVEATA_SITE, or a site key’s own website)
  • --visitor-id <id>: Visitor id from the tracker
  • --session-id <id>: Visit to join (default: the visitor’s latest visit)
  • --prop <key=value>: Custom property (repeatable, at most 20)
  • --timestamp <iso>: When it happened, ISO-8601 (default now; at most 30 days ago)

Calls POST /api/v1/websites/{website}/events (goals:write).

bash
reveata events send signup --site example.com
reveata events send upgrade --site example.com --visitor-id 5f2c9a1e7b3d4c8a --prop plan=pro

Was this helpful?