Advanced architecture
Verifiable analytics
A consented event can be committed without publishing the event itself. Add an event after Accept. The page hashes it into a Merkle tree, shows the root, and checks an inclusion proof. Decline and the tree does not take the event.
The root lives in this tab. A public transparency log that other people can read is not published.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want a root that commits to events without listing them in public. Accept, add an event, and check the proof before you trust the root.
How to use it
- Accept, then add one of the named events.
- Read the root hash.
- Check the inclusion proof for a leaf.
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.
buildMerkle hashes each event and pairs the hashes up to one root. inclusionProof returns the sibling hashes. verifyInclusion rebuilds the root and compares it. Decline skips the add.
Hash the leaf, not the raw row
hashLeaf prefixes the event name and uses SHA-256. The root is a hash, not the event list.
Keep a sibling list
The proof stores which side the sibling sits on so the check can pair in the same order.
Gate the add on Accept
The button does not append an event while consent is denied, so that event never enters the tree.
From the code
A leaf is a prefixed SHA-256.
return sha256(`leaf:${value}`)The check walks the proof back to a root.
hash = step.side === "right" ? await hashPair(hash, step.hash) : await hashPair(step.hash, hash)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: "verifiable-analytics",
})Example implementation. This site does not call Adobe. eVar173, prop173, and event173 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 eVar173 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: {
merkleChecked: "true",
},
},
})Example hit. eVar173 is hit-scoped in this example.
s.eVar173 = "true"
s.prop173 = "true"
s.events = "event173"
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…