Advanced architecture
On-device personalization
The next step can be scored without a server. Click through a short path. A small model in this page multiplies that history by fixed weights and shows the score for each suggestion. Nothing is uploaded.
Understanding the labHow to use it and why you'd want to
Why you'd want to
You want a next-step score that never leaves the browser. Click a path, read the scores, and know that Accept only queues a view event.
How to use it
- Start on Collection, then click another page.
- Read the score beside each suggestion.
- Confirm the note that nothing is uploaded.
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.
rankNext averages fixed weights from the pages you clicked and sorts the other labs. The function does not take a network argument, and the component does not call fetch.
Keep a history array
Each click appends a page id. The score is the mean weight from those ids to each candidate.
Hide the page you are on
The current page is filtered out so the list is always a next step.
Leave the scores in the tab
The component renders the numbers. It does not post them.
From the code
The score is a mean of fixed weights.
const score = history.reduce((sum, prior) => sum + (RANK_WEIGHTS[prior]?.[page.id] ?? 0), 0) / Math.max(1, history.length)Clicks only update local state.
setHistory((current) => [...current, id])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: "on-device-personalization",
})Example implementation. This site does not call Adobe. eVar162, prop162, and event162 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 eVar162 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: {
rankStayedLocal: "true",
},
},
})Example hit. eVar162 is hit-scoped in this example.
s.eVar162 = "true"
s.prop162 = "true"
s.events = "event162"
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…