Advanced architecture
Architecture you can try
Sixteen labs for the parts of a measurement system that usually stay in a diagram. Each one runs in this browser or on a route on this origin. Counts that are not from a live system are labeled example data. Accept works the same way as the other labs: the demo still runs, and a view event is queued only after you accept.
Understanding the labHow to use it and why you'd want to
Why you'd want to
These labs show an architecture choice in this browser, with example numbers marked as examples. After Accept, a lab may queue one view event and still does not call an outside account.
How to use it
- Open one lab from the list.
- Try the control and read any example label.
- Accept only if you want the view event.
- Open How we built it for the code.
- Server-side taggingFollow one event from this browser through a first-party /collect route. The route redacts, enriches, and builds a GA4 payload it does not forward.
- Consent time machineReplay one scripted visit under Accept, Decline, and partial consent. Compare cookies, storage keys, and network hits side by side.
- On-device personalizationA tiny ranking model in this browser scores the next step from the path you just clicked. The scores stay on the device.
- dataLayer contractsEach event has a JSON contract. Edit the payload and the panel flags missing fields, wrong types, and forbidden keys in red.
- Edge A/B testingSee an edge bucket split, example conversion counts, and a Bayesian probability that one arm is ahead. The counts are not live traffic.
- Agent APIRead agents.json and the journey tools on /api/mcp. Compare how an agent would walk the labs with how a person would.
- Vitals and behaviorExample Core Web Vitals joined to an example engagement rate. Filter the rows. They are not this site's field data.
- Live event graphA D3 map of this visit. Pages are nodes. Events are edges. Add a step and the drawing updates in this tab.
- Differential privacyMove an epsilon slider and watch Laplace noise change an example count. The privacy and accuracy tradeoff is drawn on the page.
- Federated learningSimulated browsers take one local step. The server averages the weights. A chart shows the loss falling. No device calls this site.
- Causal attributionA Markov removal model on example journeys. Remove a page and watch the credit and the conversion probability move.
- Predictive intentScroll, dwell, and path depth on this page become a leave score and a packages score. The note on the page changes with them.
- Agent to agentA visitor agent and the site agent exchange next-step messages over an MCP-shaped transcript. The rules are on the page. No hosted model is called.
- Verifiable analyticsAfter Accept, events you add are hashed into a Merkle tree. Check a leaf against the root with an inclusion proof.
- Digital twinScripted personas walk journey rules. Compare the predicted funnel before and after one rule change. The people are not visitors.
- Tracking time travelA dataLayer and storage timeline for this tab, with a scrubber. Move it and read the state at that step.
WalkthroughHow we built itShowHide
Example vendor setup is marked below. eVar and event numbers are examples. This lab does not call Adobe.
The advanced index lists sixteen labs and lazy-loads each demo from its own module. Example counts are labeled on the labs that use them. A view event is queued only after Accept.
Keep one catalog
advancedLabs holds the slug, the copy, whether the figures are examples, and what production would still need.
Load one demo
The slug page looks up a next/dynamic import. The index page does not import the demos.
Gate the view event
useAdvancedView calls trackLabEvent only when consent is granted. trackLabEvent itself also checks consent.
From the code
Each lab is its own dynamic import.
const TaggingLab = dynamic(() => import("./labs/tagging-lab"))The view event waits for Accept.
if (consent !== "granted") return
trackLabEvent("advanced_lab_view", { lab_id: slug })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: "advanced",
})Example implementation. This site does not call Adobe. eVar176, prop176, and event176 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 eVar176 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: {
advancedIndex: "true",
},
},
})Example hit. eVar176 is hit-scoped in this example.
s.eVar176 = "true"
s.prop176 = "true"
s.events = "event176"
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…