code wiki / _hdl_build / nx_adnet_view.nx
nx_adnet_view.nx
buildroot/runtime/_hdl_build/nx_adnet_view.nx
about
nx_adnet_view.nx -- LIB: MRC-compliant VIEWABLE-impression measurement for the sovereign ad slot.
THE DEFECT THIS CLOSES (debt 1785512185): the served-impression counter fires when the slot HTML is
INJECTED, before the browser has laid anything out. With a lazy-loaded creative that is frequently never
fetched at all, an advertiser is billed for pixels no human ever saw. The 2026 MRC display standard is
50 percent of the creative's pixels in view for 1 CONTINUOUS second; a number weaker than that is not
sellable to a paying client, and billing on it is the credibility rock for the whole ad network.
PRIVACY BY CONSTRUCTION, UNCHANGED: the beacon carries the AD id and NOTHING ELSE -- no cookie, no
visitor id, no dwell curve, no referrer, no timestamp from the client. The schema HAS NO VISITOR FIELD,
exactly like nx_adnet_selfserve. First-party only: same-origin sendBeacon and an inline script (the live
CSP is script-src 'self' 'unsafe-inline' and connect-src 'self'), zero third-party JS.
FAIL-CLOSED: an id that is not a well-formed inventory id is DROPPED, never journalled -- a fabricated
or replayed id must never be able to manufacture a billable viewable impression.
license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_adnet_slot.nx
imported by: nx_adnet_view_gate.nxnx_sites_daemon_v2.nx
structs
| none |
consts
| 21 | const AVIEW_RATIO_PCT: i64 = 50 |
| 22 | const AVIEW_DWELL_MS: i64 = 1000 |
functions
| 26 | func aview_putdec(out: *u8, off: i64, v: i64) -> i64 |
| 42 | func aview_script(out: *u8, cap: i64, ad_id: *u8) -> i64 |
| 58 | func aview_is_path(path: *u8, pn: i64) -> i64 |
| 67 | func aview_resp(path: *u8, pn: i64, out: *u8, cap: i64, idout: *u8) -> i64 |