Advanced architecture
Differential privacy
A published count can hide whether one person was in it. Move epsilon. Laplace noise is added to an example count, and the page shows how far the noisy answers drift. Lower epsilon is more private and less accurate.
Example data, not real traffic.
A production query would track a privacy budget across every release. This slider spends nothing outside the tab.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want to see how much noise a private count needs. Move epsilon, compare the example count with the noisy one, and publish nothing.
How to use it
- Read the example count of 120.
- Drag epsilon from private toward accurate.
- Read the noisy count and the average error.
Loading the lab…
WalkthroughHow we built itShowHide
Example vendor setup is marked below. eVar and event numbers are examples. This lab does not call Adobe.
noisyCount adds Laplace noise with scale 1/epsilon to an example count. meanAbsoluteError averages the absolute noise over 200 seeded draws. The true count stays labeled as an example.
Fix the example count
The page uses 120. That number is written in the component, not read from analytics.
Scale the noise by epsilon
The Laplace scale is 1 divided by epsilon, with a floor so the slider cannot divide by zero.
Show the drift
The average absolute error falls as epsilon rises. The page says that is less private.
From the code
Laplace noise from a uniform draw.
return -scale * Math.sign(uniform - 0.5) * Math.log(1 - 2 * Math.abs(uniform - 0.5))The reported error is the mean absolute noise.
return { error: total / draws, noisy: count + laplaceNoise(mulberry32(seed + 1), scale) }Google and Adobe
Google queues advanced_lab_view after Accept. Adobe is an example of the same fields.
After Accept, this lab queues advanced_lab_view. The demo payload stays on the page. This site does not call Adobe.
Simplified shape of the object queued after Accept.
dataLayer.push({
event: "advanced_lab_view",
lab_id: "differential-privacy",
})Example implementation. This site does not call Adobe. eVar168, prop168, and event168 are example variable numbers. In Launch, a data element reads the value and a rule sends it when the value changes. In the report suite, enable eVar168 with Most Recent allocation and expire it on the hit.
Example alloy payload. _example is a placeholder schema, not a real tenant.
alloy("sendEvent", {
xdm: {
eventType: "web.webinteraction.linkClicks",
_example: {
privacyEpsilon: "1",
},
},
})Example hit. eVar168 is hit-scoped in this example.
s.eVar168 = "1"
s.prop168 = "1"
s.events = "event168"
s.tl(true, "o", "advanced_lab_view")Translation
Each lab field, the GA4 name, and the example Adobe variable. Scope is the part that usually gets lost in the translation.
Lab id
GA4. Parameter lab_id on advanced_lab_view.
Adobe. Example eVar, expire on the hit.
Scope. Event. It names this lab, not the user.
Demo value
GA4. Not sent. Scores, proofs, and payloads stay on the page.
Adobe. Example prop. Do not copy the demo value.
Scope. Local state. It is not a user property.
Example counts
GA4. Not sent. Labeled example data is not a metric.
Adobe. Example event. Not sent.
Scope. A figure on the page, not a hit.
Consent
GA4. The view event is skipped until Accept.
Adobe. Example: skip the hit while consent is off.
Scope. A gate on the hit.
Recommended next
Why these picksReading path transitions…