AppMeasurement to AEP Web SDK migration reference
last verified · against AEP Web SDK / Adobe Analytics migration docs as of 2026-07
AppMeasurement to Web SDK migration reference: map every s.* variable to the data.__adobe.analytics object or XDM, with sendEvent syntax and gotchas.
What this is
Migrating from AppMeasurement to the Adobe Experience Platform Web SDK (alloy)
moves collection from the browser posting directly to Analytics to the browser
sending to the Edge Network, which forwards to report suites per a datastream.
This reference is the lookup table for the two migration paths — the no-schema
data.__adobe.analytics object and the XDM field groups — plus sendEvent
syntax, the variable-to-dimension mappings, and the gotchas that inflate page
views or silently lose data.
Two migration paths
| Path | XDM schema | Choose when | Note |
|---|---|---|---|
data.__adobe.analytics (data object) |
Not required | Lift-and-shift an existing Analytics implementation | Adobe’s documented path for orgs not yet on XDM; keeps Analytics-only data out of Real-Time Customer Profile |
XDM (xdm._experience.analytics.* + web.*) |
Required | Org also wants Customer Journey Analytics, Real-Time CDP, or Journey Optimizer | Those apps consume XDM datasets from the same datastream |
Call translation (AppMeasurement to Web SDK)
Lift-and-shift maps every s.* variable 1:1 into data.__adobe.analytics.<sameName>, keeping identical names and formats.
| AppMeasurement | Web SDK |
|---|---|
s.t() (page view) |
alloy("sendEvent", dataObj) where dataObj = {data:{__adobe:{analytics:{...}}}} |
s.tl(true,"o","Example custom link") |
set linkName / linkType / linkURL in data.__adobe.analytics, then alloy("sendEvent", dataObj) |
s.pageName |
data.__adobe.analytics.pageName |
s.channel |
data.__adobe.analytics.channel |
s.eVar1 |
data.__adobe.analytics.eVar1 |
s.prop1 |
data.__adobe.analytics.prop1 |
s.events |
data.__adobe.analytics.events |
s.linkTrackVars |
data.__adobe.analytics.linkTrackVars |
data.__adobe.analytics field to Analytics variable
All field names are case-sensitive.
| Field | Analytics variable |
|---|---|
pageName |
Page |
channel |
Site Section |
campaign |
Tracking code |
products |
Products |
events |
Custom events |
purchaseID |
Purchase ID |
contextData |
Context data variables |
linkName |
Custom / Download / Exit link |
linkType |
Link type (o / d / e) |
linkURL |
Link URL |
eVar1..eVar250 |
eVar dimensions |
prop1..prop75 |
prop dimensions |
The data object also accepts AppMeasurement query-string shorthand keys:
v1..v250 (eVars), c1..c75 (props), g (page URL),
pe / pev1 / pev2 (link vars), ch (channel), cc (currency code).
XDM path — where the variables live
Under the Adobe Analytics ExperienceEvent Template field group these auto-map with no config:
| Variable | XDM location |
|---|---|
| eVars | xdm._experience.analytics.customDimensions.eVars.eVar1..eVar250 |
| props | xdm._experience.analytics.customDimensions.props.prop1..prop75 |
| events | xdm._experience.analytics.event1to100.event1 .. event901to1000.event1000 (.id for serialization, .value for numeric events) |
| hierarchies | xdm._experience.analytics.customDimensions.hierarchies.hier1..hier5 |
Any XDM field NOT auto-mapped is delivered to Analytics as context data
(a.x. prefix for implicit mapping, or no prefix when explicitly mapped via
the contextData element); a processing rule then assigns it to a final
variable.
XDM web.* fields that auto-map to Analytics
| XDM field | Analytics dimension |
|---|---|
web.webPageDetails.name |
Page |
web.webPageDetails.URL |
Page URL |
web.webPageDetails.server |
Server |
web.webPageDetails.siteSection |
Site Section |
web.webPageDetails.isErrorPage |
Pages Not Found |
web.webReferrer.URL |
Referrer |
web.webInteraction.name |
Custom / Download / Exit link |
web.webInteraction.URL |
linkURL |
web.webInteraction.type |
Link type |
Page view vs link event (the marker that decides)
| Intent | XDM approach | Data approach |
|---|---|---|
| Page view | web.webPageDetails.name + web.webPageDetails.pageViews.value = 1 |
data.__adobe.analytics with no linkType (behaves like s.t()) |
| Link / action | web.webInteraction (name, type, linkClicks.value); omit pageViews.value |
set linkName / linkType / linkURL; omit page-view fields |
web.webInteraction.type is an enum: download, exit, other. Manual link
tracking requires web.webInteraction.name, web.webInteraction.type, and
web.webInteraction.linkClicks.value.
configure command
| Property | Required | Notes |
|---|---|---|
datastreamId |
Yes | String identifying the AEP datastream. Web SDK 2.20.0 or earlier used edgeConfigId for the same value. Omit it and the SDK has no datastream to target — data is permanently lost |
orgId |
Yes | Format ADB3LETTERSANDNUMBERS@AdobeOrg |
Optional properties (full list from the configure overview):
clickCollectionEnabled, clickCollection, context, debugEnabled,
defaultConsent, downloadLinkQualifier, edgeBasePath,
edgeConfigOverrides, edgeDomain, idMigrationEnabled, onBeforeEventSend,
prehidingStyle, targetMigrationEnabled, thirdPartyCookiesEnabled.
Confirmed defaults: clickCollectionEnabled = true, idMigrationEnabled =
true, defaultConsent = in. The edgeDomain and edgeBasePath defaults are
not confirmed against a primary Adobe reference here — verify on their reference
pages before quoting a value.
sendEvent command
| Property | Notes |
|---|---|
xdm |
Schema-conformant data |
data |
Non-XDM data — used for data.__adobe.analytics |
type |
Event type string, e.g. commerce.purchases |
documentUnloading |
Boolean |
renderDecisions |
Boolean |
personalization |
e.g. decisionScopes |
edgeConfigOverrides |
Per-event datastream override |
Maximum payload size sent to Adobe: 64 KB.
Identity
identityMap is an XDM map keyed by namespace; each namespace holds an array of
{ id, authenticatedState, primary } descriptors. At least one ID present must
be marked primary: true.
| Field | Meaning |
|---|---|
id |
The identifier value |
authenticatedState |
Confirmed values authenticated, ambiguous; a third state exists but was not named on the identity reference pages (the standard XDM value is loggedOut — verify) |
primary |
Boolean; person-level namespace (CRM ID, hashed email) should be primary when available, otherwise the ECID is the identity |
The Edge Network generates the ECID, persists it in a first-party cookie, and
adds it to events automatically; getIdentity retrieves it client-side. A
First-Party Device ID (FPID) must be UUIDv4 format and is converted to an ECID
by a deterministic algorithm. idMigrationEnabled (default true) reads the
ECID from the legacy AMCV_ cookie and writes its own kndctr_<org>_identity
cookie with the same ECID — it needs the same orgId and the same
domain/subdomain the Visitor Service used.
Consent (defaultConsent)
| Value | Behavior |
|---|---|
in (default) |
Collect until opt-out |
out |
Discard until opt-in |
pending |
Queue/store locally until setConsent |
Values are case-sensitive. defaultConsent is NOT persisted across page loads
(pass it on every configure); consent recorded via setConsent is stored in a
cookie and reapplied on later visits.
Automatically collected XDM
Collected unless removed via the context config: device.screenHeight /
screenWidth / screenOrientation; environment.browserDetails.viewportHeight
/ viewportWidth; environment.type (always browser); placeContext.localTime
(ISO 8601) and placeContext.localTimezoneOffset; web.webPageDetails.URL
(current page); web.webReferrer.URL (previous page); timestamp (UTC ISO 8601,
cannot be removed); implementationDetails.name
(https://ns.adobe.com/experience/alloy) and implementationDetails.version.
Automatic link tracking
clickCollectionEnabled defaults to true: the SDK tracks clicks on <a> and
<area> elements that lack an onClick attribute and populates
xdm.web.webInteraction.name / type / URL.
| Condition | webInteraction.type |
|---|---|
Matches downloadLinkQualifier or has a download attribute |
download |
Target domain differs from window.location.hostname |
exit |
| Otherwise | other |
Link name is derived in priority order: innerText, descendant text, alt,
title, input value, img src, aria-label, name.
Report-suite routing (server-side)
The datastream — not client code — declares the Report Suite ID: add the Adobe Analytics service to the datastream and enter the Report Suite ID. Multiple report suites (multi-suite tagging) and per-page/per-environment overrides are configured as additional/override report suites in the datastream. Flow: browser to Edge Network to Analytics report suites, a server-side fan-out per the datastream configuration.
Gotchas
- Inflated or duplicate page views — cause:
web.webPageDetails.pageViews.value = 1set on link/interaction calls, or automatic click collection firing alongside a manual call (a datasendEventwith nolinkTypebehaves likes.t()) — fix: setpageViews.value = 1(or send data with nolinkType) only on genuine page loads; useweb.webInteraction/linkName+linkType+linkURLand omitpageViews.valuefor links and SPA interactions. - Data never arrives, no errors thrown — cause:
datastreamId(or legacyedgeConfigIdon2.20.0or earlier) missing/wrong, or the datastream has no Adobe Analytics service / Report Suite ID — fix: verifyconfigurehas the correctdatastreamIdandorgIdand that the datastream’s Analytics service holds the right Report Suite ID; omittingdatastreamIdloses data permanently. - Visitors duplicated or split, ECID counts jump during parallel run — cause: the Visitor ID Service (
AMCV_) and the Web SDK (kndctr_) both mint identity before the AMCV cookie exists, or they use differentorgId/domain, soidMigrationEnabledcannot reconcile — fix: keepidMigrationEnabledtrue, configure the sameorgIdon the same domain/subdomain, and do not initialize both identity systems on a first visit; disable migration only after most cookies migrate. - Custom eVars/props/events absent though present in XDM — cause: arbitrary XDM fields are not auto-mapped; only fields under the Adobe Analytics ExperienceEvent Template field group map, everything else arrives as context data (
a.x.prefix) needing a processing rule — fix: place values underxdm._experience.analytics.*(or use thedata.__adobe.analytics.eVarN/propN/eventspassthrough), or add processing rules for the context-data values. - Consent/queuing resets or collects when it should hold — cause:
defaultConsentis not persisted and must be passed on everyconfigure; onlysetConsentpersists; values are case-sensitive — fix: setdefaultConsenton every page and record the real choice withsetConsent; usependingto buffer events until the user chooses. - Unwanted link hits on every anchor click — cause:
clickCollectionEnableddefaults totrue, auto-tracking all<a>/<area>clicks withoutonClick— fix: setclickCollectionEnabled: false, or scope collection viaclickCollection/downloadLinkQualifier. channellands in the wrong report or seems missing — cause:data.__adobe.analytics.channelmaps to the Site Section dimension (ass.channelalways did), not a separatechannelvariable — fix: expect the values under Site Sections; map to an eVar/prop if you need a distinct dimension.- Large payloads rejected or truncated — cause: the
sendEventpayload has a64 KBmaximum — fix: trim XDM/data payloads; do not dump oversized data layers into a singlesendEvent.
Quick recipes
Lift-and-shift page view — the s.t() equivalent, no XDM schema:
// no linkType => the Edge Network counts this as a page viewvar dataObj = { data: { __adobe: { analytics: {} } } };var a = dataObj.data.__adobe.analytics;a.pageName = window.document.title;a.channel = "support"; // -> Site Section dimensiona.eVar1 = "logged-in";a.events = "event1";alloy("sendEvent", dataObj);Custom link — the s.tl(true,"o","Example custom link") equivalent:
// linkType present => link call, NOT a page viewvar dataObj = { data: { __adobe: { analytics: {} } } };var a = dataObj.data.__adobe.analytics;a.linkName = "Example custom link";a.linkType = "o"; // "o" other, "d" download, "e" exita.linkURL = "https://example.com/whitepaper.pdf";alloy("sendEvent", dataObj);Page view via XDM (for CJA/RTCDP orgs):
alloy("sendEvent", { xdm: { web: { webPageDetails: { name: "support:home", pageViews: { value: 1 } } }, _experience: { analytics: { customDimensions: { eVars: { eVar1: "logged-in" } }, event1to100: { event1: { value: 1 } } } } }});Dual-tag cutover configure — one shared ECID, consent buffered:
alloy("configure", { datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93", orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg", // SAME org the Visitor Service used idMigrationEnabled: true, // read AMCV_, reuse one ECID defaultConsent: "pending" // hold events until setConsent});Send with a person-level primary identity (ECID is added automatically):
alloy("sendEvent", { xdm: { identityMap: { CRMID: [{ id: "abc-123", authenticatedState: "authenticated", primary: true }], EMAIL: [{ id: "user@example.com", authenticatedState: "authenticated", primary: false }] }, web: { webPageDetails: { name: "account:home", pageViews: { value: 1 } } } }});Turn off automatic link collection for manual control:
alloy("configure", { datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93", orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg", clickCollectionEnabled: false // stop auto <a>/<area> tracking});Related
Sources
Adobe Experience League and AdobeDocs pages these values were read from:
- Migrate from AppMeasurement to the Web SDK (read 2026-07-20)
- Data object field mapping to Adobe Analytics (read 2026-07-20)
- XDM object field mapping to Adobe Analytics (read 2026-07-20)
- configure command overview (read 2026-07-20)
- datastreamId (read 2026-07-20)
- idMigrationEnabled (read 2026-07-20)
- defaultConsent (read 2026-07-20)
- clickCollectionEnabled (read 2026-07-20)
- sendEvent command overview (read 2026-07-20)
- Identity data in the Web SDK (read 2026-07-20)
- First-party device IDs and identityMap (read 2026-07-20)
- Web Interaction XDM data type (read 2026-07-20)
- Web Page Details XDM data type (read 2026-07-20)
- Automatically collected information (alloy-docs) (read 2026-07-20)
- Set up Adobe Analytics using the Web SDK (read 2026-07-20)
Flagged rather than guessed: the exact Web SDK version that renamed
edgeConfigId to datastreamId (Adobe’s docs state only that 2.20.0 or
earlier used the old name), the edgeDomain / edgeBasePath defaults, and the
third authenticatedState enum value are not confirmed against a primary Adobe
page here.
Changelog
- — Initial version, verified against official documentation.