Web SDK and the Edge Network
Who this page is for
| Audience | Why it matters to you |
|---|---|
| Implementation engineers | This is how data flows in 2026 |
| Architects | Understand the modern infrastructure |
Web SDK and the Edge Network
Web SDK is Adobe's modern JavaScript library for data collection. It sends data to Adobe's Edge Network instead of directly to Analytics.
Why the Edge Network?
Previously, AppMeasurement sent data directly to Adobe Analytics:
Browser → Adobe Analytics servers
This was single-purpose. Web SDK sends to Edge, which routes to multiple solutions:
Browser → Adobe Edge Network → Analytics + Real-time CDP + AJO + ...
Benefits:
- One call carries data for multiple Adobe solutions
- Faster (Edge is closer geographically)
- Server-side processing possible
- Privacy-friendly (can honor consent before sending)
Installing Web SDK
Via Tags (recommended)
- In Adobe Tags, install "Web SDK" extension
- Configure datastream ID
- Create rules to send events
- Deploy
No code needed. You configure in UI.
Via direct script
<script>
!function(n,e){window.alloy_queue=window.alloy_queue||[],window.alloy=function(){window.alloy_queue.push(arguments)};var t=e.createElement("script");t.async=!0,t.src="https://cdn1.adoberesources.net/alloy/2.6.4/alloy.min.js",e.head.appendChild(t)}(window,document);
// Configure
alloy("configure", {
edgeConfigId: "YOUR-CONFIG-ID",
orgId: "YOUR-ORG-ID@AdobeOrg"
});
// Send event
alloy("sendEvent", {
xdm: {
web: { webPageDetails: { name: "Homepage" } },
eventType: "web.webpagedetails.pageViews"
}
});
</script>
Sending events
Web SDK sends "events" (not hits). Each event is a user action.
alloy("sendEvent", {
xdm: {
web: {
webPageDetails: {
name: "Product Page"
}
},
device: {
type: "Mobile"
},
eventType: "web.webpagedetails.pageViews"
}
});
Datastreams
A datastream (formerly called config) defines how data flows from Edge to destinations.
In a datastream, you configure:
- Adobe Analytics (report suite ID, variables mapping)
- Real-time CDP (identity namespace, merge policies)
- AJO (for orchestration)
- Third-party destinations
You can have multiple datastreams (dev, staging, prod).
Data mapping
Web SDK sends XDM data. You map it to Analytics variables in the datastream:
XDM field: xdm.web.webPageDetails.name
→ Maps to: Analytics prop5
XDM field: xdm.commerce.order.priceTotal
→ Maps to: Analytics revenue variable
This mapping is done in the datastream UI, not in code.
Consent before sending
Web SDK can check consent before sending data:
alloy("setConsent", {
consent: [{
standard: "IAB TCF",
version: "2.0",
value: consentString
}]
});
Edge respects consent. If user hasn't consented, data is collected but not sent to Analytics.
Server-side forwarding
You can send data from your server using the Edge API:
curl -X POST https://edge.adobedc.net/ee/v2/interact
-H "Content-Type: application/json"
-d '{
"events": [{
"xdm": {
"eventType": "order.completed",
"commerce": {
"order": {
"priceTotal": 99.99,
"currencyCode": "USD"
}
}
}
}]
}'
Use this for backend events (order processed, payment failed, etc.).
Debugging Web SDK
Use the browser console:
// Enable debug mode
alloy("configure", {
debugEnabled: true
});
// Now all events log details to console
Or use the AEP Debugger extension (browser plug-in) to see events in real-time.
Migration from AppMeasurement
If you're moving from AppMeasurement to Web SDK:
- Install Web SDK alongside AppMeasurement (dual implementation)
- Validate Web SDK sends correct data
- Migrate audiences gradually (10% → 50% → 100%)
- Sunset AppMeasurement
Takes 2-6 weeks depending on implementation complexity.
---
Next: XDM schemas and field groups