Skip to developer documentation
Browse developer documentation
API documentation / Browser tracking

Browser tracking

Collect standard browser activity

The standard tracker transport for pageviews, goals and identity calls. Prefer the official t.js installation.

POST/api/v1/collect

Access: Public · no authentication · Permission details

JSON request body

JSON request fields
FieldTypeDescription
siteIdRequiredstringPublic website ID.
visitorIdRequiredstringObserved visitor identifier, up to 64 characters.
eventTypestringActivity type.

Values: pageview, custom_goal, identify.

Default: pageview.

urlPathstringPage path, up to 500 characters.

Default: /.

referrerstringOptional recorded acquisition context.
utmSourcestringOptional recorded acquisition context.
utmMediumstringOptional recorded acquisition context.
utmCampaignstringOptional recorded acquisition context.
utmContentstringOptional recorded acquisition context.
utmTermstringOptional recorded acquisition context.
clickIdTypestringOptional recorded acquisition context.
rootDomainstringValidated against the request Origin/Referer host for subdomain navigation.
eventNamestringGoal name, up to 120 characters.
emailstringIdentity email, only with the site's authorized identity collection.
metadataobjectOptional event properties.

Request examples

Examples run from your server or terminal. Configure ATTRIBOO_TOKEN privately for authenticated requests. Replace example website IDs and values with your own. The examples make real requests when you run them.

cURL request
curl -X POST "https://www.attriboo.com/api/v1/collect" \
  -H "Content-Type: application/json" \
  --data '{
  "siteId": "site_example",
  "visitorId": "v_example",
  "eventType": "pageview",
  "urlPath": "/pricing",
  "referrer": "https://www.google.com/"
}'

Response

Illustrative response. This endpoint returns raw JSON. Optional coverage, notes and continuation fields vary by report.

Response fields
FieldTypeDescription
okbooleanRequest accepted.
channelGroupstringClassified channel.
sourceNamestringClassified source.
JSON response
{
  "ok": true,
  "channelGroup": "Organic Search",
  "sourceName": "Google Organic"
}

Behavior and limits

Public website IDs are not API credentials. Never attach a workspace key to a browser collection request.

Use t.js to coordinate consent, local exclusions, visitor identity, SPA navigation and checkout behavior. Call this transport only after applying the site's tracking and consent choices; a raw request does not implement the browser's consent UI.

The tracker sends a text/plain JSON body with fetch keepalive to avoid a preflight; application/json bodies are also parsed. Browser requests supply Origin/Referer for hostname handling. The cURL body shows the contract, not a substitute for a real browser installation.

Bot user agents return HTTP 202 with { ok: true, ignored: bot }. Other accepted events can still be excluded or dropped by collection controls. A 200 response is not proof a visit was retained.

HTTP statusMeaning
400Invalid body or activity could not be recorded.
404Unknown website.