Advanced architecture
Consent time machine
The same visit does not have to mean the same hit. Pick Accept, Decline, or partial and step through one scripted visit. Each column shows the cookies, storage keys, and network hits that policy would allow. The visit is not this site's traffic.
Example data, not real traffic.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want to see one visit under three consent choices before you pick a policy. The columns are a script, and Accept does not turn those hits into real calls.
How to use it
- Choose Accept, Decline, or partial.
- Step through the visit with the scrubber.
- Compare cookies, storage, and network hits.
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.
replayVisit returns three different sets of cookies, storage keys, and network rows for Accept, Decline, and partial. The rows are a script. The page does not set those cookies.
Decline keeps the hit empty
Decline returns no cookies and no network rows. Storage shows the consent key as denied.
Partial sends a cookieless ping
Partial keeps a functional cookie and one network row that says no client id.
Accept lists the full script
Accept lists an example analytics cookie and a forward row marked not called.
From the code
Decline is an empty network list.
if (mode === "decline") {
return { cookies: [], storage: [{ name: "site.consent.v1", detail: "denied" }], network: [] }
}The scrubber only reveals rows up to the current step.
const visible = rows.slice(0, step + 1)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: "consent-time-machine",
})Example implementation. This site does not call Adobe. eVar161, prop161, and event161 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 eVar161 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: {
consentMode: "partial",
},
},
})Example hit. eVar161 is hit-scoped in this example.
s.eVar161 = "partial"
s.prop161 = "partial"
s.events = "event161"
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…