demo · v152

Private Aggregation Note

Probe for the Private Aggregation API and play with a first-party noise replacement. Dial the bucket and contribution; the page shows the local-DP noise you'd add before shipping the value back to your own server.

Private Aggregation API status:

local first-party measurement (with laplace noise)

click contribute to add a noisy contribution

the API (removed) and replacement

// REMOVED in Chrome 152
// privateAggregation.contributeToHistogram({ bucket: 42n, value: 1 });

// REPLACEMENT — laplace-noised first-party log
function noisy(v, eps) {
  const u = Math.random() - 0.5;
  return v - Math.sign(u) * Math.log(1 - 2 * Math.abs(u)) / eps;
}
fetch('/metrics', { method: 'POST', body: JSON.stringify({ bucket, value: noisy(value, eps) }) });

see also