code wiki / _hdl_build / nx_ad_serve_policy.nx

nx_ad_serve_policy.nx

buildroot/runtime/_hdl_build/nx_ad_serve_policy.nx

2239 B49 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic ad
docsdependenciesstructsconstsfunctions

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

nx_ad_serve.nx nx_syscalls.nx nx_ad_serve_policy.nx nx_ad_serve_policy_gate.nx nx_connect_ads.nx

imports: nx_ad_serve.nxnx_syscalls.nx

imported by: nx_ad_serve_policy_gate.nxnx_connect_ads.nx

structs

none

consts

none

functions

17func sp_geo_match(geo: *u8, targets: *u8) -> i64
39func sp_should_serve(already_shown: i64, geo: *u8, targets: *u8) -> i64
called by 2: mainca_should_serve calls 1: sp_geo_match
46func sp_should_offer(is_shopping: i64, geo: *u8, targets: *u8) -> i64
called by 1: main calls 1: sp_geo_match