Advanced architecture
Tracking time travel
Debugging a tag means seeing the state at one moment, not the latest push only. Add events, then drag the scrubber. The dataLayer list and the storage keys rewind to that step. The timeline is this tab.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want the dataLayer at an earlier step, not only the latest push. Add events and drag the scrubber so the storage keys rewind with it.
How to use it
- Add a page view, a click, or consent.
- Drag the scrubber to an earlier step.
- Read the dataLayer and the storage keys.
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.
projectTimeline slices the beats at the scrubber index. Consent and storage beats update a key map. Later beats disappear when you move backward. The timeline is component state.
Append a beat
A button pushes an event name and a small param map. It does not call the real dataLayer unless you have accepted and the view event fires separately.
Slice at the index
projectTimeline keeps beats from the start through the selected index.
Rebuild storage
Only beats inside the slice write keys, so rewinding removes later keys.
From the code
The slice ends at the scrubber.
const slice = beats.slice(0, Math.max(0, Math.min(beats.length, index + 1)))Storage is rebuilt from the visible beats.
if (beat.event === "consent_update" && beat.params.analytics) storage["site.consent.v1"] = beat.params.analyticsGoogle and Adobe
This lab does not queue its own event. The Google block is an example. Adobe is an example too.
This lab does not queue an analytics event of its own. The push below is an example, not a call this page makes. This site does not call Adobe.
Example only. This page does not push this object.
// Example only. This lab does not queue this event.
dataLayer.push({
event: "tracking_time_travel_example",
lab_id: "tracking-time-travel",
})Example implementation. This site does not call Adobe. eVar175, prop175, and event175 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 eVar175 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: {
timelineIndex: "0",
},
},
})Example hit. eVar175 is hit-scoped in this example.
s.eVar175 = "0"
s.prop175 = "0"
s.events = "event175"
s.tl(true, "o", "tracking-time-travel_example")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…