code wiki / _hdl_build / nx_ad_serve_policy.nx
nx_ad_serve_policy.nx
buildroot/runtime/_hdl_build/nx_ad_serve_policy.nx
about
nx_ad_serve_policy.nx -- LIB: the polite SERVE POLICY for the performance ad engine (ADS-012,
CALLOUT-004). Extends the ADS-004 placement with the WHEN/WHETHER decision:
- ONCE PER VISIT: the byline appears at most once per visit (polite, gets out of the way;
X-ADS-POLITE-001) -- no engagement farming, no attention extraction.
- GEO-TARGETED: serve only where the campaign chose to (visit geo in the campaign's geo set).
- OFFER-ONLY-WHERE-VALUABLE: beyond the byline, the value-exchange OFFER appears only where it
is genuinely useful (e.g. a shopping property in the visitor's geo) -- never forced.
PRIVACY: the only signals are (a) a transient "shown this visit" flag (no identity; rides the
existing nx_no_cookie_session) and (b) a COARSE geo (country/region, not PII). No visitor is
tracked. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_ad_serve.nxnx_syscalls.nx
imported by: nx_ad_serve_policy_gate.nxnx_connect_ads.nx
structs
| none |
consts
| none |
functions
| 17 | func sp_geo_match(geo: *u8, targets: *u8) -> i64 |
| 39 | func sp_should_serve(already_shown: i64, geo: *u8, targets: *u8) -> i64 |
| 46 | func sp_should_offer(is_shopping: i64, geo: *u8, targets: *u8) -> i64 |