Record a consent decision
Records a visitor’s consent decision without an event, and returns the consent now in force for them.
Applied immediately rather than queued: a withdrawal has to bind the next delivery. It is not billed as an event, and it is never forwarded to a destination — it decides what may be.
Resolving identity inline means a call whose identifiers span two persons merges
them, taking the workspace-scoped merge lock on the request path. Measured at
~6ms against ~2ms without, so roughly 4ms of lock hold, and only on the call that
first links two identities — the enricher takes the same lock on every merge at
far higher volume, so this is a rounding error on that contention rather than a
new bottleneck. Recording on each matched person instead would avoid the lock,
at the cost of a second resolution mode in IdentityResolver; not worth it
until the lock actually shows up in production.
Authentication
Request
Identifying traits (email, phone)
When the decision was made (Unix seconds). Defaults to now; a time in the future is clamped to now.
Response
Google Consent Mode v2.
A category is granted, denied, or absent — and absent is a real third
state that ConsentWhenAbsent decides, not a synonym for either answer.
Semantics live in pivolio.consent.