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.
88%
Does it follow best practices?
Impact
83%
0.83x1 of 3 eval scenarios. Add 2 more for a full score.
Low
Low-risk findings worth noting
Authors personalize a whole section by adding rows to its Section Metadata.
The browser runtime, the edge worker and this skill's scripts all use the same grammar code
(scripts/personalization/section-spec.js, unchanged), so every environment reads a section the
same way. The schema is assets/contract/schemas/section.schema.json.
| Section Metadata | |
| Style | highlight (any other rows stay) |
| Personalization | home-hero |
| Personalization Source | rules (default; split, api, target) |
| Personalization Variants | /fragments/personalization/home-hero/india |
| | /fragments/personalization/home-hero/na-mobile |
| Personalization Rule India | geo: IN |
| Personalization Rule NA Mobile | geo: US, CA & device: mobile |
| Personalization Rule India 2 | param: utm_campaign=diwali |In the content document (content/<page>.html, which is what DA stores), the rows form a
section-metadata block inside the section. The Variants cell has one link per paragraph. The
template is assets/content/section-metadata.html:
<div>
<h1>Original hero</h1>
<p>Authored copy: the default.</p>
<div class="section-metadata">
<div><div><p>Personalization</p></div><div><p>home-hero</p></div></div>
<div><div><p>Personalization Variants</p></div><div>
<p><a href="/fragments/personalization/home-hero/india">/fragments/personalization/home-hero/india</a></p>
<p><a href="/fragments/personalization/home-hero/na-mobile">/fragments/personalization/home-hero/na-mobile</a></p>
</div></div>
<div><div><p>Personalization Rule India</p></div><div><p>geo: IN</p></div></div>
<div><div><p>Personalization Rule NA Mobile</p></div><div><p>geo: US, CA & device: mobile</p></div></div>
</div>
</div>| Row | Value | For | Rules |
|---|---|---|---|
Personalization | Section id, e.g. home-hero | All | ^[a-z0-9][a-z0-9_-]*$, at most 64 characters, unique on the page. Used by ?pzn=, the engine and events |
Personalization Source | rules | split | api | target | All | Optional; the default is rules |
Personalization Variants | Fragment links, one per line | All (required) | The allowlist. Fragments must be under fragmentPrefixes (default /fragments/). The variant name is the last path segment. A variant named default, a duplicate name, or an item that isn't a fragment path is an error |
Personalization Rule <Variant> | One condition (criteria.md) | rules (at least one); api (the fallback) | Checked top to bottom; the first match wins. <Variant> must name a listed variant. Rule India 2 adds another rule for the same variant |
Personalization Split | 40, 30 | split | One percentage per variant, in Variants order; the default gets the rest. Without the row, the split is even. More values than variants, or a total over 100, is an error |
Personalization Hint | What the section should achieve (at most 500 characters) | api | Optional. Used by engines that choose with a model (OF1) |
Personalization Description <Variant> | What that variant offers (at most 600 characters) | api | Optional. Description Default describes the authored content. Recommended for OF1 |
Personalization Location | An existing Target location (mbox) | target | Use it when the location isn't the section id |
Personalization Trigger | scroll: 60%, view or load | target | Makes the section a popup |
Personalization Display | inline | popup | target | Defaults to popup with a Trigger row, else inline. popup without a Trigger uses scroll: 70% |
Errors make the section invalid: it shows its default, with outcome invalid and a console
warning. The errors are:
split or Hint outside api;split or target section;Experiment, Campaign,
Audience: …). One personalization per section.Warnings:
Personalization <something> row;rules variant with no rule, which only a ?pzn= preview can show;Display | inline.Variant names and rule keys are compared loosely: case, spaces, _ and - count as equal
(Persona_A = persona-a). This is needed because the pipeline keeps _ in keys while older
aem.js turns it into -.
Hint and Description rows are public: they are in the page HTML. Write them like marketing copy, with no internal notes and no personal data.
| Source | Who decides | Without consent | Details |
|---|---|---|---|
rules (default) | The Rule rows, in the browser or at the edge | Default, unless the rules exception applies | criteria.md |
split | A random draw, kept for the session, against the default | Default and not assigned, unless the split exception applies | split.md |
api | A decision engine, in one batched call; the Rule rows are the written fallback | Default, unless the api or rules exception applies | decision-api.md |
target | Adobe Target, inline or as a popup | Default (popups wait); there is no exception | target.md |
Only listed variants are ever shown. A source that answers anything else gives outcome fallback
with reason not listed: …. There is no other source and no plugin mechanism in the first
release: any other engine uses the decision engine API. Consent is covered in consent.md.
/fragments/personalization/<id>/<variant> by
convention. Anything under fragmentPrefixes is allowed. Keep fragmentPrefixes the same in
config.js and edge-config.js. URLs are reduced to their path, so a fragment always loads
from the site itself.Style), id and data
attributes. The fragment's own Section Metadata is dropped.TODO: unless the user gave the copy. A
bare heading drops the layout and costs CLS and LCP. assets/content/fragment.html is the bare
scaffold for when there is nothing to copy.loading="eager" and fetchpriority="high".noindex (bulk metadata, see da-content.md). They must not
contain a personalized section; the validator rejects nesting.Once decided, a section carries the decision as attributes. The same values go into the
pzn:decided event (decisions-and-measurement.md).
| Attribute | Value |
|---|---|
data-pzn-variant | What is shown: a variant name, or default |
data-pzn-source | rules, split, api, target, override (?pzn=) or bot. An api section that fell back to its Rule rows says rules |
data-pzn-outcome | variant, control, intentional-default, no-match, low-confidence, no-consent, fallback, timeout, error, invalid, bot or override |
data-pzn-reason | Why, when it isn't obvious: HTTP 500, not listed: x, fragment failed: /path, no decision, or the engine's reason code |
data-pzn-decision | The decisionId: <id>#1, then #2 and so on after re-evaluations |
data-pzn-status | applied (browser). From the edge: applied or selected |
data-pzn-where | edge when the edge decided the section |
data-pzn-cached | true when the answer came from a cache |
data-pzn-tracking | Edge only: the engine's tracking JSON (at most 1 KB, no personal data) |
The rows reach the runtime only as data-personalization* attributes on the section. Two setups
produce them:
toMetaName: characters outside [0-9a-zA-Z:_-] become -, then the
name is lowercased (Personalization Rule NA Mobile → data-personalization-rule-na-mobile).,. Several paragraphs in one cell are
joined with ,.Personalization Rule India rows therefore silently lose one: number them.aem.js. If its decorateSections still reads the section-metadata block in the
browser, it produces the same attributes before the hook runs. This works too.detect-project.mjs reports which setup renders the site (sectionMetadata.renderedBy).
validate-placeholders.mjs renders local content the way the pipeline does and flags repeated rows
and multi-paragraph rule cells. When verify-preview.mjs finds no personalized section on the
page, it fails with a rendering-v2 hint.
Style row to the new section.budgets.eager (800 ms). Prefer the edge for it (rules, split, api), or personalize a
later section. target is browser-only, so use a popup or a later section. The validator fails
a slow engine (of1) on a first section decided in the browser.cross-cutting.md).{name}) are not sections: use the placeholders sheet..tessl-plugin
skills
personalize
assets
reference
scripts
test
fixtures
browser
contract
examples
decision-feedback
decision-request
decision-response
measurement-event
invalid
section
site-config
site
content
scripts
personalization