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
/*
* AEM Cloudflare worker with personalization.
*
* aem-worker.mjs is the official adobe/aem-cloudflare-prod-worker, unchanged.
* This wrapper only adds the decision-engine route and post-processes HTML
* responses; if personalization fails, the origin response is served as is.
* Fragments (variants, and texts for engine descriptions) come from the same
* origin, through the same worker logic.
*/
// The upstream worker ships as .mjs; keep its file name unchanged.
// eslint-disable-next-line import/extensions
import aemWorker from './aem-worker.mjs';
import config from './personalization/edge-config.js';
import { handleApiRoute, personalizeResponse } from './personalization/personalize.js';
export default {
async fetch(request, env, ctx) {
// signal: personalize.js aborts a fragment that misses its deadline.
const fetchPlain = (path, { signal } = {}) => aemWorker.fetch(new Request(new URL(`${path}.plain.html`, request.url), {
headers: { host: request.headers.get('host') || new URL(request.url).host },
signal,
}), env, ctx);
const routed = await handleApiRoute(request, env, config, { fetchPlain });
if (routed) return routed;
const response = await aemWorker.fetch(request, env, ctx);
return personalizeResponse(request, response, {
config, env, cf: request.cf, ctx, fetchFragment: fetchPlain,
});
},
};.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