Skip to content

Tracking endpoints

The edge worker serves the public endpoints that power web analytics and funnel tracking. Visitors’ browsers, your servers and ad platforms call them; nobody opens them as pages. They answer on the edge worker’s default address and on your tracking domains, which is the recommended setup because first-party URLs are not blocked as third-party trackers.

This page is a map. The full protocol (payloads, fields, examples) is in Tracker protocol, and funnel links are explained in Tracking links.

URL Variant
/s.js Default tracker (first-party cookie amb_vid identifies the visitor; no cookies when the site is set to cookieless)
/s.cookieless.js Cookieless variant
/s.hash.js For single-page sites that route with # in the URL

Scripts are served from memory with an ETag, cached for one hour and revalidated in the background, and can be loaded from any website. See Install the tracker.

  • GET /e?site=<siteId>: site mode check made by /s.js and /s.hash.js before they write any cookie. It answers {"cookieless": true} or {"cookieless": false} (cached by browsers for 5 minutes), or 404 unknown_site. On a cookieless site the scripts then run without cookies and expire the ones written earlier. See Tracker protocol.
  • POST /e: browser events (pageviews, goals, identify and so on) sent by the tracker. The body is JSON sent as plain text so it works with navigator.sendBeacon, up to 16 KB. Events are accepted only when both the sending page and the request origin belong to the site’s hostnames. Known bots and crawlers are counted separately and never become visitors.
  • POST /e/server: server-side events (goals, payments, identify, server pageviews, crawler hits), authenticated with Authorization: Bearer amb_sk_<siteId>.<secret>, the site’s server secret.
Status error Meaning
202 — Accepted
400 invalid_event Malformed event (server ingest lists up to 5 issues in details)
401 invalid_site_secret Wrong or missing server secret
403 origin_not_allowed The page or origin is not one of the site’s hostnames
404 unknown_site Unknown site ID
413 payload_too_large Over 16 KB
URL Purpose
/go/<funnelId>-<sourceId>[/<nodeId>[/<pageId>]] Entrance link of a traffic source: records the visit with its tracking parameters, runs the funnel and redirects (302) to the destination with the visitor ID
/a/<n> and /go/<funnelId>/<nodeId>/a/<n> Action links placed on funnel pages (button 1, 2, …)
/pb Conversion postback (for example from an affiliate network or a checkout)
/pb/event Custom event postback

On a tracking domain these paths have no prefix. On the shared default edge address they are prefixed with /s/<siteId>, for example /s/<siteId>/go/….

GET /.well-known/amable-tracking answers on every hostname that reaches the edge worker with:

{ "service": "amable-edge" }

amabledata calls it to verify that a zone tracking domain really points to your edge worker (see Zone domains). It is never cached.

Endpoint Method Auth
/s.js, /s.cookieless.js, /s.hash.js GET None
/e?site=<siteId> GET None
/e POST (OPTIONS for preflight) Site hostnames
/e/server POST Site server secret
/go/…, /a/<n> GET None
/pb, /pb/event GET See Tracking links
/.well-known/amable-tracking GET None
  • Event bodies: 16 KB maximum.
  • Browser events from hostnames not configured on the site are refused; add every domain where the tracker runs to the site (see Sites).
  • Creating or rolling a site’s server secret requires the analytics configuration permission and a step-up verification.
Symptom Cause Fix
403 origin_not_allowed in the browser console The page’s domain is not a hostname of the site. Add the domain to the site’s hostnames.
401 invalid_site_secret from your server The secret was rolled or is mistyped. Copy the current secret from the site settings.
A zone tracking domain stays unverified /.well-known/amable-tracking on that host does not answer with amable-edge. Check the DNS and the worker route of the domain.
Funnel links answer 404 on the default address The /s/<siteId> prefix is missing. Copy the link again from the funnel, or use a tracking domain.