Skip to content
trackrift

Documentation

Guides

Verify tracking

Live health panel, Events explorer, payload inspection, and systematic debugging.

AI brief: Use /config tracking tab live pulse and /events for raw payloads. Common issues: wrong public_id in script, origin not in allowlist, CORS/cookies third-party, ad blockers on t.trackrift.com vs custom CNAME. debug:true on tracker.init logs to console.

Verification is split into real-time health (is data arriving?) and payload quality (is the data correct for attribution and CAPI?). Both are available in the dashboard without third-party tools.

Dashboard verification tools

ToolPathUse for
Live verificationSettings → TrackingLast event time, event_name, origin — 5s refresh
Events explorerEventsFull JSON payload, filters by event_name / date
Quality / healthQuality (if enabled)Drop reasons, missing fields, match scores
Onboarding checksOnboardingScript id mismatch, CNAME pending, destination gaps

Browser DevTools workflow

  1. Open Network, filter by collect or your CNAME host.
  2. Load the page — expect GET /bootstrap then POST /collect with status 204.
  3. Inspect request payload: events[] should include event_name, anonymous_id, page.url, context.
  4. Trigger a test purchase — confirm value, currency, and returned event_id.
  5. If blocked: check Console for CORS errors, ad-blocker extensions, or consent gating (consentMode: required).
debug-init.ts
tracker.init({
  endpoint: 'https://api.trackrift.com',
  publicId: 'YOUR_PUBLIC_ID',
  debug: true, // [tracker] logs: queue, flush, dedupe skips
});

// Manual flush (npm SDK) — useful before navigation in SPAs
tracker.track('page_view');
// Events flush on interval or batchSize — watch network tab

Payload fields to validate

FieldExpectedIf missing
anonymous_idUUID-like stringBootstrap failed — check cookies / ITP / third-party context
page.urlFull canonical URLSPA not firing page_view on route change — use Next provider
context.utm_*Present only when UTMs in URLNormal on internal navigation — not a bug
context.fbclid / gclidWhen ad click landedLost if redirect strips query params — fix landing URL
event_idUUID per eventRequired for CAPI dedupe with pixel

Script id mismatch

The u.js query param id= must match your workspace public_id exactly. A typo sends events to the wrong workspace or drops them. Onboarding flags mismatches automatically.

204 No Content is success

The collector returns 204 on successful ingest. Do not expect a JSON body on /collect — use the Events page to see stored events.

curl-s2s.sh

Verify server ingest independently of the browser

curl -sS -X POST 'https://api.trackrift.com/s2s/collect' \
  -H 'Authorization: Bearer YOUR_SERVER_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "events": [{
      "event_name": "sales_closed",
      "email": "[email protected]",
      "value": 1,
      "currency": "USD",
      "source": "server"
    }]
  }'
# Expect HTTP 204