Skip to content

08 — Conversion Pixel Flow

Parent spec: 2026-05-23-08-advertiser-dashboard-design.md §6 Research: research/astro-cf-monorepo-patterns.md

Sequence from advertiser-site page-load through dashboard read.

The advertiser website loads the pixel script and sends page-view or purchase events. The collector validates and stores permitted conversion data. Dashboard queries aggregate purchases and revenue to calculate return on advertising spend.The advertiser website loads the pixel script and sends page-view or purchase events. The collector validates and stores permitted conversion data. Dashboard queries aggregate purchases and revenue to calculate return on advertising spend.
  • HMAC verify path: signing key is derived (HMAC(CONVERSION_PIXEL_SECRET, site_key)) so leaking one bidder’s signing key does not expose others. The pixel SDK does not sign client-side at MVP — the X-NYL-Sig header is computed by the bidder’s site server if they want strong guarantees; otherwise the ingest accepts site-key-only auth with a rate-limit (1000 events / site_key / hour).
  • Replay protection: ts_sig is server-computed and stored; an attacker replaying the body without a fresh ts is rejected by the ±5min skew check.
  • Privacy: IP truncation + daily-rotating salt makes visitor_hash non-correlatable across days and non-reversible to a person. No third-party cookie is set anywhere in this flow.
  • CORS: preflight cached 1h at edge (Access-Control-Max-Age: 3600).
  • Failure modes: pixel never blocks the host page — load is async, errors are swallowed silently (no console.error to the host site).