Tracking

Tracking - Start Session

Called by the SPA on FIRST page load per visit. Records a site_session row with landing + attribution + parsed device + geo, upserts the site_visitor row by cookie token, and sets two httpOnly cookies on the response so subsequent /page-view calls work without the SPA managing tokens explicitly.

Idempotent-ish: a repeat call within the same visit generates a NEW site_session (that's the definition of "new visit"), reusing the visitor cookie if present.

─── Cookies set on response ──────────────────────────── juju_tracking_visitor httpOnly, 1-year, SameSite=Lax juju_tracking_session httpOnly, session, SameSite=Lax

─── Failure semantics ────────────────────────────────── Always 200 unless the request itself is unparseable. Tracking is best-effort; page rendering must never be gated on this endpoint.

post/api/v1/tracking/session

Request

  • Base URL: https://api.juju.com
  • URL: https://api.juju.com/api/v1/tracking/session
  • Auth: none declared

Request body

landing_pathstring nullable
landing_querystring nullable
referrerstring nullable
utm_sourcestring nullable
utm_mediumstring nullable
utm_campaignstring nullable
utm_termstring nullable
utm_contentstring nullable
gclidstring nullable

Google Ads click id

fbclidstring nullable

Meta click id

msclkidstring nullable

Microsoft Ads click id

Response

Session recorded (or silently skipped). Cookies set on response.

metaobject required

Pagination and context metadata. Always present, empty object ({}) when no metadata applies to the response.

errorsstring[] required

Empty array on success. On failure, human-readable error strings suitable for surfacing to end users.

Example response

{
  "errors": []
}

Changes

No recorded changes to this operation across all 1 revision of this API.