code wiki / _hdl_build / nx_ad_conversion.nx
nx_ad_conversion.nx
buildroot/runtime/_hdl_build/nx_ad_conversion.nx
about
nx_ad_conversion.nx -- LIB (no main): privacy-preserving CONVERSION measurement for the
"Brought to you by" performance ad engine (ADS-018, CALLOUT-004). The server-side count an
advertiser is allowed to SEE for a campaign-period, built to the charter (W-AN-CHARTER-001)
instead of against it. NO-FLOATING: this imports its two foundations and cannot run without
them -- bot-filter (ADS-019) + k-anon floor (nx_kanon).
THE PIPELINE (per campaign-period), all AGGREGATE, never per-visitor:
1. CONSENT-GATE -- only buckets the visitor consented to count (consent==1)
2. BOT-FILTER -- drop invalid traffic via the shared ad_botrules (ADS-019)
3. AGGREGATE SUM -- add the surviving counts into ONE number per campaign-period
4. K-ANON FLOOR -- release that number only if it clears K, else "<k" (-1) suppressed
A conversion = a consented, first-party, AGGREGATE-counted outcome (a click-through the visitor
chose, a self-reported "interested/bought", or a purchase on a Nishi-hosted property). It is a
COUNT per campaign-period, NEVER attributed to an identified individual: the data model has no
visitor id / IP / fingerprint -- only class-bucket counts -- so attribution is impossible by
construction. (Attribution state, if a campaign uses device-local attribution, lives on the
VISITOR-DEVICE vault, ADS-015 -- a separate row; the server only ever receives an incremented
count.) license_tier: ORIGINAL
dependencies 3 imports · 3 importers
imports: nx_ad_botfilter.nxnx_kanon.nxnx_syscalls.nx
imported by: nx_ad_conversion_gate.nxnx_ad_exceed.nxnx_ad_meter.nx
structs
| none |
consts
| none |
functions
| 32 | func cv_raw(ev: *i64, m: i64, rules: *i64, nrules: i64) -> i64 |
| 50 | func cv_release(ev: *i64, m: i64, rules: *i64, nrules: i64, k: i64) -> i64 |