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
One body-fragment document per DA path under content/ (what aem up serves locally).
| Content | Local file | DA path |
|---|---|---|
| Page with the personalized section | content/<page>.html | /<page> |
| Variant fragment | content/fragments/personalization/<id>/<variant>.html | /fragments/personalization/<id>/<variant> |
<body><header></header><main>…</main><footer></footer></body>):
sections are <div>s in <main>, blocks are <div class="name"> div-grids, no <table>.Personalization … rows to the section's existing
section-metadata block (or add one at the end of the section), as in authoring-model.md
(template: assets/content/section-metadata.html).
The section's content stays where it is: it is the default. Never delete or move authored
content; to personalize only part of a section, split the section and copy its Style row.TODO: unless the user provided the text; assets/content/fragment.html only when
there is nothing to copy. List the TODOs in the summary.noindex comes from bulk metadata (below).validate-placeholders.mjs before any upload.Nothing leaves the machine by default. Once every validation gate passes (SKILL.md Steps 6–7),
the push, the DA upload + preview, and the publish each run only after the user confirms that
step, every time. A hands-off run, or no answer, stops before the first of them and hands off the
commands below. The order is: push, upload and preview, verify on the branch preview, and publish only
once main serves this runtime and no copy is still TODO:. Upload only the personalized pages
and their fragments.
Path 1, DA_TOKEN (the da-auth skill obtains one; the Source API contract is in the
da-content skill, aem-edge-delivery-services plugin):
set -e
PATHS="/fragments/personalization/<id>/<variant> /<page>"
# after the user confirmed the upload + preview:
for p in $PATHS; do
curl -fsS -X PUT -H "Authorization: Bearer $DA_TOKEN" -F "data=@content$p.html;type=text/html" \
"https://admin.da.live/source/<org>/<repo>$p.html" >/dev/null
curl -fsS -X POST -H "Authorization: Bearer $DA_TOKEN" \
"https://admin.hlx.page/preview/<org>/<repo>/<branch>$p" >/dev/null
done
# publish: both checks must pass (each exits 1 otherwise), then the user confirms.
node <skill>/scripts/validate-placeholders.mjs content --repo . --publish # no TODO copy
node <skill>/scripts/install-runtime.mjs . --check-live https://main--<repo>--<owner>.aem.live
for p in $PATHS; do
curl -fsS -X POST -H "Authorization: Bearer $DA_TOKEN" "https://admin.hlx.page/live/<org>/<repo>/main$p" >/dev/null
done--check-live compares what main serves with this repo: every runtime module and config.js
byte for byte, and both scripts.js hooks. A sections.js that merely answers 200 can be an older
install. A mismatch, a missing file or a network error fails it.
Path 2, a DA MCP server (no DA_TOKEN, an MCP connected): its source-write tool for each path in
the same list (the same body-fragment documents), then its preview tool, then publish under the
same rules: each step confirmed, publish only after both checks pass.
data with type text/html; other names fail silently.fragment failed).<branch>--<repo>--<owner>.aem.page, which runs the pushed branch's code. main--…
preview and every aem.live page run main: before the merge a personalized section shows only
its authored content (no runtime reads the rows), so do not publish, and say so in the summary (the publish loop is the hand-off).401, stop and hand off the commands
with a note to refresh the token.Fragments are fetched as .plain.html but also exist as pages. Mark them noindex once per site
in the DA bulk metadata sheet (/metadata, published as /metadata.json):
| URL | robots |
|---|---|
/fragments/** | noindex |
If the sheet exists, add the row (do not overwrite other rows); if it does not, ask the user to
create it in DA (a sheet named metadata at the site root) and preview/publish it. Check after
publish: curl -s https://main--<repo>--<owner>.aem.page/fragments/personalization/<id>/<variant> | grep -i 'name="robots"'.
Personalization Variants (DA's link tool; one link per
line) and a Personalization Rule <Variant> row. Rule order matters (first match wins). A second
rule for the same variant is Personalization Rule <Variant> 2: two rows with the same name
keep only the last one.& for AND, , for OR within a criterion).Personalization Source | split (and optionally Personalization Split | 50).
Target: Personalization Source | target; the Personalization id is the location (mbox),
unless a Personalization Location row names another one.Personalization Hint and Personalization Description <Variant> rows (decision engines) are
public, because they are in the page HTML: write them like marketing copy.?pzn=<id>:<variant> on *.aem.page, and add pzn-consent=1 to see
what a consenting visitor gets. ?pzn-debug shows each decision's outcome and reason..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