CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

adobe/aem-eds-personalization

Section-based personalization for AEM Edge Delivery Services (DA) pages: Section Metadata rows let rules (geo, device, visitor, URL/UTM param, page state, custom audiences), a decision engine (v1 API, OF1), an A/B split or Adobe Target (inline or popup) pick the EDS fragment a section shows, with the authored content as default. Consent first, measurement events per decision, a client runtime plus an optional Cloudflare edge worker, a simulator and Playwright checks.

0.83x
Quality

88%

Does it follow best practices?

Impact

83%

0.83x

1 of 3 eval scenarios. Add 2 more for a full score.

SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

decisions-and-measurement.mdskills/personalize/reference/

Decisions and Measurement

Contents

  • Outcomes
  • Events
  • Decision identity and re-evaluation
  • Where events go
  • Analysis views
  • Debugging

Outcomes

Every decision ends with exactly one outcome. It is written on the section as data-pzn-outcome and sent in pzn:decided.

OutcomeMeaningShowsassigned
variantA variant was chosenVariantThe variant
controlThe control arm: the split default arm, an engine { "control": true }, or a Target { "control": true } offerDefault (no Rule rows)default
intentional-defaultThe engine chose the authored content as the best fit (variant: "default")Default (no Rule rows)default
no-matchNo rule matched; the engine had no candidate, didn't answer for the section, or gave an unlisted reason; Target returned nothingRule rows for api, else defaultAbsent, unless Rule rows picked a variant
low-confidenceThe engine answered reason: "low_confidence"Rule rows for api, else defaultSame as no-match
no-consentNo consent and no approved exception; also an api section whose Rule rows decided under the rules exception (source: rules)Default, or the Rule rows' pick under the rules exceptionAbsent, even when the Rule rows picked a variant
fallbackThe source failed (HTTP error, bad JSON, provider_error, invalid_choice, request timeout) or answered something not listedRule rows for api, else defaultSame as no-match
timeoutThe section's budget ran outDefaultAbsent
error, invalidA code error, or invalid rowsDefaultAbsent
bot, overrideCrawler, or a ?pzn= previewDefault, or the forced variantoverride: the forced variant

When an api section falls back to its Rule rows, the outcome still says why the engine wasn't used, source becomes rules, and variant is what the Rule rows picked. data-pzn-reason and the event's reason keep the detail: HTTP 500, not listed: x, fragment failed: /path, no decision, or the engine's code. The reason a default was shown is never lost.

Events

Every event has id, decisionId, variant (what is shown), source, where (browser or edge) and outcome. It also has assigned when a source assigned something. Schema: assets/contract/schemas/measurement-event.schema.json.

EventWhenAlso carries
pzn:decidedA source answered (or failed)trigger (initial, refresh, state, consent), reason, ms, cached, tracking, test
pzn:appliedThe page shows the resultresult: applied, kept-default, unchanged, failed
pzn:seenAt least analytics.seenThreshold (25 %) of the section is visible; a popup when it opensresult, tracking, test
pzn:clickedThe first link click inside the sectionresult, href (no query or hash)
pzn:notifiedA Target notification (display, click) or engine feedback (seen, clicked) was sentnotification: { product, type, ok }

seen, clicked, Target display/click and engine feedback go out at most once per decisionId. Target display/click and engine feedback go only for a successful application: a treatment that failed to show (result: failed) keeps its decided / applied records and its seen / clicked (of the default), but tells no product it was shown. A control that kept the default is a success and still counts. Some outcome and result combinations are not allowed; scripts/schema.mjs checks them:

outcomeresultvariant shown
variantapplied, unchangedThe assigned variant
variantfaileddefault
control, intentional-defaultkept-default, unchangeddefault
Any otherapplied or unchanged (Rule rows picked a variant), kept-default, failedWhat is shown

A failed treatment is therefore assigned: "pro", variant: "default", result: "failed". A visitor without consent has outcome: "no-consent" and no assigned, so neither can look like control exposure.

split sections carry test: { type: "split", weights }; target sections carry test: { type: "target" }, with Target's activity and experience names in tracking.

Decision identity and re-evaluation

decisionId is <section id>#1, then #2 and so on within the page view. It is new on every page view, even for a cached answer (cached: true; the engine's own id in tracking keeps its original value).

Two evaluations are the same decision only when all of these are equal: source, assigned, outcome, reason, cached, tracking, test, and the Target notification tokens. A re-evaluation comes from refresh(), setState() or a consent change.

The new evaluationDecisionEvents
Same identityThe same decisionIdNone. It is listed in the ?pzn-debug table with its trigger
Same variant, different identityNew decisionIddecided; applied with unchanged; seen again (at once if the section is visible); then clicked, notifications and feedback for the new decision
A different variant, or the defaultNew decisionIdThe full set, as on page load
Consent withdrawnNew decisionId; the default is restored, outcome no-consentOnly what the rum and data-layer exceptions allow

Variant equality alone never suppresses events: identity decides. An older answer that arrives late is ignored.

Where events go

  • DOM. A CustomEvent with the event name is dispatched on the section (it bubbles). detail is the personalization object.

  • Data layer. window.adobeDataLayer.push({ event, personalization }), when analytics.dataLayer is on (the default). The array is created if missing. The site's Tags/Analytics rules map these events.

  • RUM. On pzn:applied, for successfully applied arms only, when analytics.rum is on (the default):

    • sampleRUM('experiment', { source: <id>, target: <assigned> }) for split sections;
    • sampleRUM('audience', …) for other sections with outcome variant or intentional-default.

    RUM is sampled and marks application, not exposure. The full record is the data layer.

  • Target and engines. Target gets its display and click notifications (target.md). The engine gets optional feedback (decision-api.md).

All of this follows the consent policy: without consent, only what the rum and data-layer exceptions allow is sent (consent.md).

Analysis views

Report these three views together:

  1. Assignment (the A/B population): pzn:decided with outcome variant or control (intentional-default as its own group). It includes visitors whose treatment then failed.
  2. Application: pzn:applied for the same decisions. It shows the failure rate per arm.
  3. Exposure: pzn:seen with a successful result. This is a secondary, filtered view and never replaces the assignment population.

Failed treatments stay in their assigned arm. Timeouts, fallbacks, low confidence, no match and no consent are in no arm; report their counts beside the test.

Debugging

?pzn-debug prints a table with these columns: id, decisionId, variant, source, outcome, reason, ms, cached, trigger, popup status and notifications. window.hlx.personalization.decisions holds the same rows, including evaluations that produced no new decision.

skills

personalize

SKILL.md

README.md

tile.json