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
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.

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.

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

  1. Inflated or duplicate page views — cause: web.webPageDetails.pageViews.value = 1 set on link/interaction calls, or automatic click collection firing alongside a manual call (a data sendEvent with no linkType behaves like s.t()) — fix: set pageViews.value = 1 (or send data with no linkType) only on genuine page loads; use web.webInteraction / linkName + linkType + linkURL and omit pageViews.value for links and SPA interactions.
  2. Data never arrives, no errors thrown — cause: datastreamId (or legacy edgeConfigId on 2.20.0 or earlier) missing/wrong, or the datastream has no Adobe Analytics service / Report Suite ID — fix: verify configure has the correct datastreamId and orgId and that the datastream’s Analytics service holds the right Report Suite ID; omitting datastreamId loses data permanently.
  3. 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 different orgId/domain, so idMigrationEnabled cannot reconcile — fix: keep idMigrationEnabled true, configure the same orgId on the same domain/subdomain, and do not initialize both identity systems on a first visit; disable migration only after most cookies migrate.
  4. 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 under xdm._experience.analytics.* (or use the data.__adobe.analytics.eVarN/propN/events passthrough), or add processing rules for the context-data values.
  5. Consent/queuing resets or collects when it should hold — cause: defaultConsent is not persisted and must be passed on every configure; only setConsent persists; values are case-sensitive — fix: set defaultConsent on every page and record the real choice with setConsent; use pending to buffer events until the user chooses.
  6. Unwanted link hits on every anchor click — cause: clickCollectionEnabled defaults to true, auto-tracking all <a> / <area> clicks without onClick — fix: set clickCollectionEnabled: false, or scope collection via clickCollection / downloadLinkQualifier.
  7. channel lands in the wrong report or seems missing — cause: data.__adobe.analytics.channel maps to the Site Section dimension (as s.channel always did), not a separate channel variable — fix: expect the values under Site Sections; map to an eVar/prop if you need a distinct dimension.
  8. Large payloads rejected or truncated — cause: the sendEvent payload has a 64 KB maximum — fix: trim XDM/data payloads; do not dump oversized data layers into a single sendEvent.

Quick recipes

Lift-and-shift page view — the s.t() equivalent, no XDM schema:

pageview-lift-and-shift.js
// no linkType => the Edge Network counts this as a page view
var dataObj = { data: { __adobe: { analytics: {} } } };
var a = dataObj.data.__adobe.analytics;
a.pageName = window.document.title;
a.channel = "support"; // -> Site Section dimension
a.eVar1 = "logged-in";
a.events = "event1";
alloy("sendEvent", dataObj);

Custom link — the s.tl(true,"o","Example custom link") equivalent:

custom-link.js
// linkType present => link call, NOT a page view
var dataObj = { data: { __adobe: { analytics: {} } } };
var a = dataObj.data.__adobe.analytics;
a.linkName = "Example custom link";
a.linkType = "o"; // "o" other, "d" download, "e" exit
a.linkURL = "https://example.com/whitepaper.pdf";
alloy("sendEvent", dataObj);

Page view via XDM (for CJA/RTCDP orgs):

pageview-xdm.js
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:

configure-dual-tag.js
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):

send-with-identity.js
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:

disable-click-collection.js
alloy("configure", {
datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",
clickCollectionEnabled: false // stop auto <a>/<area> tracking
});

Sources

Adobe Experience League and AdobeDocs pages these values were read from:

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.

dataLayer

0 events · 0 sent

    • home /
      writing /writing
      guides /guides
      work /#work
      about /about
      colophon /colophon
      toggle analyst mode ctrl+.
      print session receipt /#receipt