Advanced architecture
Causal attribution
Last click gives the whole sale to the last page. This lab uses a Markov chain on example journeys. Remove a page and the conversion probability drops by that page's share. The journeys are not stored visits.
Example data, not real traffic.
A live model would read consented paths from storage. These journeys are written into the page.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want credit that changes when a page is removed, not a last-click guess. Pick a page and read the new shares on these example journeys.
How to use it
- Read the baseline conversion probability.
- Remove home, lab, consent, or packages.
- Watch the other pages' credit move.
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.
conversionProbability walks the example journeys as a Markov chain. Removing a page sends traffic that would have entered it to exit. removalCredits normalizes the drop in conversion.
Count the transitions
Each example journey adds a start edge and an edge between neighbors. convert and exit absorb.
Solve the chance of convert
Forty passes update every open state from its outgoing probabilities.
Normalize the removal effect
Credit is the drop from the baseline divided by the sum of the drops.
From the code
A removed page becomes an exit.
const next = removed && to === removed ? "exit" : toCredit is the positive drop, normalized.
credit: sum === 0 ? 0 : row.effect / sumGoogle 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: "causal-attribution",
})Example implementation. This site does not call Adobe. eVar170, prop170, and event170 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 eVar170 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: {
removedPage: "lab",
},
},
})Example hit. eVar170 is hit-scoped in this example.
s.eVar170 = "lab"
s.prop170 = "lab"
s.events = "event170"
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…