AEP Web SDK configuration reference
last verified · against AEP Web SDK docs as of 2026-07
Every Adobe Web SDK configure option with verified defaults, plus sendEvent, identityMap, setConsent, and debugging commands on one reference card.
What this is
The Adobe Experience Platform Web SDK (alloy.js) is the single library that
replaces AppMeasurement, Visitor API, at.js, and DIL, sending everything to
the Edge Network against one datastream. This card is the lookup table for
the configure command’s options and defaults, the sendEvent payload, the
identityMap shape, and the consent and debugging commands.
configure — required options
| Option | Type | Notes |
|---|---|---|
datastreamId |
string | Which datastream receives the data. “Web SDK versions 2.20.0 or earlier use edgeConfigId instead.” A wrong value routes data nowhere — that loss is permanent |
orgId |
string | IMS org, format ADB3LETTERSANDNUMBERS@AdobeOrg |
alloy("configure", { datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93", orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",});configure — optional options and defaults
| Option | Default | What it does |
|---|---|---|
edgeDomain |
edge.adobedc.net |
Edge Network hostname; Adobe recommends an org-specific first-party (CNAME) domain |
edgeBasePath |
ee |
Base path of Edge requests |
defaultConsent |
in |
Consent before any setConsent call: in, out, or pending — case-sensitive; any other value throws |
idMigrationEnabled |
true |
Reads the ECID from the legacy AMCV cookie on the first request, preserving visitor continuity from Visitor API implementations |
thirdPartyCookiesEnabled |
true |
Set false to stop using the Audience Manager third-party cookie for visitor identification |
clickCollectionEnabled |
true |
Automatic link-click collection |
clickCollection |
per clickCollectionEnabled |
Sub-object: internalLinkEnabled, downloadLinkEnabled, externalLinkEnabled, eventGroupingEnabled, sessionStorageEnabled, filterClickDetails(content) |
downloadLinkQualifier |
\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$ |
Regex; a match sets xdm.web.webInteraction.type to "download" |
context |
all except two | Auto-collected context categories. Defaults collect everything except highEntropyUserAgentHints and oneTimeAnalyticsReferrer; if you set the array, omitted categories stop being collected |
debugEnabled |
false |
Debug logging for all visitors |
prehidingStyle |
— | CSS hiding content until personalization renders (synchronous implementations) |
onBeforeEventSend |
— | Callback that can inspect/modify content.xdm and content.data before each send |
edgeConfigOverrides |
— | Per-instance datastream overrides, e.g. { datastreamId: "…" } |
targetMigrationEnabled |
— | Target migration support (default not stated on the pages accessed) |
Full context value list: web, device, environment, placeContext,
highEntropyUserAgentHints, oneTimeAnalyticsReferrer. The configure
overview documents further options beyond this table — anything not listed
here was not verified for this card.
sendEvent
| Option | Type | Notes |
|---|---|---|
xdm |
object | Data matching your XDM schema |
data |
object | Non-XDM data; datastream mapping (Data Prep) can map it into XDM |
type |
string | Sets xdm.eventType, e.g. commerce.purchases |
documentUnloading |
boolean | Uses sendBeacon for exit links |
renderDecisions |
boolean | Renders eligible personalization; “incompatible with the documentUnloading property. Avoid setting both properties to true” |
personalization |
object | e.g. { decisionScopes: ["hero-banner"] }; sendDisplayEvent defaults to true |
edgeConfigOverrides |
object | Per-event datastream override |
identityMap
Each top-level key is a namespace; each descriptor carries id,
authenticatedState (ambiguous, authenticated, loggedOut), and
primary. Namespaces must already exist in Identity Service. The Edge
Network adds the ECID automatically — you do not need to send it, and if you
do, don’t mark it primary when a person-level identity is present.
alloy("sendEvent", { xdm: { identityMap: { CRMID: [{ id: "abc-123-xyz", authenticatedState: "authenticated", primary: true }], }, web: { webPageDetails: { name: "account:home" } }, },});Consent commands
defaultConsent: "pending" queues work until a setConsent arrives; "out"
discards it. Grant with the Adobe 2.0 standard:
alloy("setConsent", { consent: [{ standard: "Adobe", version: "2.0", value: { collect: { val: "y" }, share: { val: "y" }, personalize: { content: { val: "y" } }, metadata: { time: "2026-07-20T15:52:25+00:00" }, }, }],});Adobe recommends including an identityMap in setConsent when it runs
before other commands, so consent is recorded against the right ECID.
Debugging
| Tool | Use |
|---|---|
alloy("setDebug", { enabled: true }) |
Toggle debug mode at runtime; Adobe advises dev environments or your own machine in production |
debugEnabled: true in configure |
Debug for all visitors — leave off in production |
alloy("getLibraryInfo") |
Resolves with libraryInfo.version, commands, configs |
alloy("getIdentity", { namespaces: ["ECID"] }) |
Reads the ECID (from the kndctr cookie when present, otherwise via an Edge request) plus edge.regionID |
Gotchas
- No data anywhere, no errors. Cause: wrong or stale
datastreamId— the SDK sends happily and the data is unrecoverable. Fix: copy the ID from the datastream details screen per environment; verify hits in Experience Platform Debugger before launch. configurethrows on the consent option. Cause:defaultConsentis case-sensitive and accepts onlyin,out,pending—"In"or"granted"is an error. Fix: use the exact lowercase strings.- Client hints or Analytics referrer stopped collecting. Cause: setting
contextreplaces the default set — “If you choose to define the context property, you must explicitly include all desired values.” Fix: list every category you want, not just the ones you’re adding. - Unique visitors spike after migrating from AppMeasurement/Visitor API.
Cause:
idMigrationEnabled: false, so the AMCV cookie’s ECID is ignored and visitors mint new IDs. Fix: keep ittrueuntil all pages run the Web SDK. - Exit-link events and personalization fight each other. Cause:
renderDecisions: truecombined withdocumentUnloading: true— the docs say to avoid setting both. Fix: render decisions on the page-view event; send unloading events without them. - Old library rejects
datastreamId. Cause: “Web SDK versions 2.20.0 or earlier useedgeConfigIdinstead.” Fix: upgrade the library, or use the option name matching your version.
Quick recipes
Production-ready configure — first-party domain, pending consent:
alloy("configure", { datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93", orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg", edgeDomain: "data.example.com", defaultConsent: "pending", onBeforeEventSend: function (content) { if (content.xdm.web?.webReferrer) delete content.xdm.web.webReferrer.URL; },});Page view with data → XDM mapping left to the datastream (Data Prep):
alloy("sendEvent", { type: "web.webpagedetails.pageViews", xdm: { web: { webPageDetails: { name: "home" } } }, data: { page: { template: "landing" } },});Read the visitor’s ECID:
alloy("getIdentity", { namespaces: ["ECID"] }).then(function (result) { console.log("ECID:", result.identity.ECID);});Exit link via beacon:
alloy("sendEvent", { documentUnloading: true, xdm: { web: { webInteraction: { name: "footer-cta", type: "exit" } } },});Related
Sources
Adobe Experience League pages these values were read from (2026-07-19):
- configure command overview
- datastreamId
- defaultConsent
- edgeDomain
- idMigrationEnabled
- thirdPartyCookiesEnabled
- clickCollectionEnabled · context · downloadLinkQualifier · debugEnabled
- sendEvent overview
- Identity map
- setConsent / Web SDK consent
- setDebug · getIdentity
Flagged rather than guessed: the targetMigrationEnabled default and the
full option list beyond this table (the overview documents more, e.g.
streaming media settings) were not verified for this card.
Changelog
- — Initial version, verified against Adobe Experience League documentation.